vim:keys: Clear highlights on normal-mode Esc

Clear highlights from visual selection or word highlighting together
with the highlight of the search results.
This commit is contained in:
2024-02-20 01:19:55 +01:00
parent 7611f37f25
commit b3f1a469db

View File

@@ -1,7 +1,7 @@
" vim: set foldmethod=marker:
" Keybindings """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Stop highlighting search result when pressing Return
nnoremap <silent> <Esc> :nohlsearch<CR><Esc>
" Clear all kinds of highlights when pressing Escape in normal mode
nnoremap <silent> <Esc> :nohlsearch <bar> call ClearHighlights()<CR><Esc>
" Indentation jump
" https://vim.fandom.com/wiki/Move_to_next/previous_line_with_same_indentation