runtime(nohlsearch): simplify mapping
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>
This commit is contained in:
committed by
Christian Brabandt
parent
fbc37f138a
commit
aeca7176f3
@ -1,5 +1,5 @@
|
||||
" nohlsearch.vim: Auto turn off hlsearch
|
||||
" Last Change: 2024-06-18
|
||||
" Last Change: 2024-06-19
|
||||
" Maintainer: Maxim Kim <habamax@gmail.com>
|
||||
"
|
||||
" turn off hlsearch after:
|
||||
@ -8,7 +8,7 @@
|
||||
augroup nohlsearch
|
||||
au!
|
||||
noremap <Plug>(nohlsearch) <cmd>nohlsearch<cr>
|
||||
noremap! <expr> <Plug>(nohlsearch) execute('nohlsearch')[-1]
|
||||
noremap! <Plug>(nohlsearch) <cmd>nohlsearch<cr>
|
||||
au CursorHold * call feedkeys("\<Plug>(nohlsearch)", 'm')
|
||||
au InsertEnter * call feedkeys("\<Plug>(nohlsearch)", 'm')
|
||||
augroup END
|
||||
|
||||
Reference in New Issue
Block a user