aboutsummaryrefslogtreecommitdiff
path: root/autoload/insert_suspend_hlsearch.vim
blob: de43d107337022e1181dfeae9bfd76f3d695829f (plain)
1
2
3
4
5
6
7
8
" Save value of 'hlsearch' into a variable, and disable it
function! insert_suspend_hlsearch#() abort
  let s:hlsearch = &hlsearch
  set nohlsearch
  autocmd insert_suspend_hlsearch InsertLeave *
        \ let &hlsearch = s:hlsearch
        \|autocmd! insert_suspend_hlsearch InsertLeave
endfunction