vim:keys: Use <Esc> to set nohlsearch

Use <Esc> to set `nohlsearch` instead of <CR>.
<Esc> has no purpose in normal mode and has the benefit, that the cursor
is not moved.
This commit is contained in:
2022-02-16 00:55:03 +01:00
parent a98457e66b
commit f994d8bf69

View File

@@ -1,6 +1,6 @@
" Keybindings """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Keybindings """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Stop highlighting search result when pressing Return " Stop highlighting search result when pressing Return
nnoremap <silent> <CR> :nohlsearch<CR><CR> nnoremap <silent> <Esc> :nohlsearch<CR><Esc>
" Indentation jump " Indentation jump
" https://vim.fandom.com/wiki/Move_to_next/previous_line_with_same_indentation " https://vim.fandom.com/wiki/Move_to_next/previous_line_with_same_indentation