mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
38a1d41ac0
Use <cmd> instead of <expr> with execute(...)[-1]
closes: vim/vim#15047
aeca7176f3
Co-authored-by: Maxim Kim <habamax@gmail.com>
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
|