mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
e1d48d5cf2
related: vim/vim#15039
closes: vim/vim#15402
5753d99ff6
Co-authored-by: Maxim Kim <habamax@gmail.com>
21 lines
551 B
VimL
21 lines
551 B
VimL
" nohlsearch.vim: Auto turn off hlsearch
|
|
" Last Change: 2024-07-31
|
|
" Maintainer: Maxim Kim <habamax@gmail.com>
|
|
"
|
|
" turn off hlsearch after:
|
|
" - doing nothing for 'updatetime'
|
|
" - getting into insert mode
|
|
|
|
if exists('g:loaded_nohlsearch')
|
|
finish
|
|
endif
|
|
let g:loaded_nohlsearch = 1
|
|
|
|
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
|