forked from aniani/vim
Use <cmd> instead of <expr> with execute(...)[-1] closes: #15047 Signed-off-by: Maxim Kim <habamax@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
15 lines
471 B
VimL
15 lines
471 B
VimL
" nohlsearch.vim: Auto turn off hlsearch
|
|
" Last Change: 2024-06-19
|
|
" Maintainer: Maxim Kim <habamax@gmail.com>
|
|
"
|
|
" turn off hlsearch after:
|
|
" - doing nothing for 'updatetime'
|
|
" - getting into insert mode
|
|
augroup nohlsearch
|
|
au!
|
|
noremap <Plug>(nohlsearch) <cmd>nohlsearch<cr>
|
|
noremap! <Plug>(nohlsearch) <cmd>nohlsearch<cr>
|
|
au CursorHold * call feedkeys("\<Plug>(nohlsearch)", 'm')
|
|
au InsertEnter * call feedkeys("\<Plug>(nohlsearch)", 'm')
|
|
augroup END
|