vim: avoid toggling the search highlight option
I usually want to clear the highlights after doing whatever the reason for the search was, but having to re-enable it all the time was annoying. So, using `:nohlsearch` fixes that, as this command does exactly what I actually wanted all along.
This commit is contained in:
parent
716709a783
commit
0828088421
1 changed files with 2 additions and 2 deletions
|
@ -62,8 +62,8 @@ register {
|
|||
-- quickly change background
|
||||
M('n', '<leader>bg', [[:let &background = &background ==? 'light' ? 'dark' : 'light'<cr>]]),
|
||||
|
||||
-- toggle search highlight
|
||||
M('n', '<leader>h', ':set hlsearch!<cr>'),
|
||||
-- disable highlight until next search
|
||||
M('n', '<leader>h', ':nohlsearch<cr>'),
|
||||
|
||||
-- toggle NERDTree
|
||||
M('n', '<leader>n', ':NERDTreeToggle<cr>'),
|
||||
|
|
Loading…
Add table
Reference in a new issue