vim:aucmd: Clear highlights on exiting visual mode

When exiting visual mode I want to clear the highlights of the visual
selection. As this is done automatically now, <Esc> does not need to do
it (and i had problems with keys.vim executing ClearHighlights because
of the script variables).

This reverts commit b3f1a469db ("vim:keys: Clear highlights on
normal-mode Esc").
This commit is contained in:
2024-03-24 16:35:49 +01:00
parent bfccb0f089
commit 6260c84f3a
2 changed files with 12 additions and 5 deletions

View File

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