Neovim: Feature: automatically disable hlsearch after / or ?

Created on 23 Dec 2014  路  3Comments  路  Source: neovim/neovim

It would be nice if hlsearch is intelligent to recognize users actions so it will not be turned on for certain commands such as search and substitute.

Most helpful comment

@pencilcheck if you want an easy way to clear the highlighting, you can do this in your vim config:

nnoremap <silent> <C-l> :nohlsearch<CR><C-l>

That will make it so that not only CTRL-L will redraw the screen, but it will drop the search highlighting. I have something similar in my vim config.

All 3 comments

That's a feature. And there are already plugins that do this kind of stuff.

https://github.com/junegunn/vim-oblique
https://github.com/osyo-manga/vim-over

Oh cool, thx a lot

@pencilcheck if you want an easy way to clear the highlighting, you can do this in your vim config:

nnoremap <silent> <C-l> :nohlsearch<CR><C-l>

That will make it so that not only CTRL-L will redraw the screen, but it will drop the search highlighting. I have something similar in my vim config.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gnujeremie picture gnujeremie  路  3Comments

amiryal picture amiryal  路  3Comments

JelteF picture JelteF  路  3Comments

mqudsi picture mqudsi  路  3Comments

davidgranstrom picture davidgranstrom  路  3Comments