How to get rid of search highlight in Vim

前端 未结 7 1138
误落风尘
误落风尘 2020-12-13 03:25

I have :set hlsearch as default value.

When I search for something, search terms get highlighted. However many times I want to get rid of the highlight,

7条回答
  •  無奈伤痛
    2020-12-13 03:54

    Try this:

    set hlsearch!
    nnoremap  :set hlsearch!
    

    and hit F12 to clear when desired. Use :noh in command mode to clear.

提交回复
热议问题