diff options
author | Teddy Wing | 2019-12-05 01:40:05 +0100 |
---|---|---|
committer | Teddy Wing | 2019-12-05 01:40:05 +0100 |
commit | 47588e81201656b2892048aa8795cb5efd04fa6b (patch) | |
tree | 209f4d561e4b220daddfd2c0da2fb92ba01edabe /nohlslash.vim | |
download | vim-nohai-47588e81201656b2892048aa8795cb5efd04fa6b.tar.bz2 |
Idea for a command to 'nohlsearch' after searching
Came up with this in 2016, but at the time didn't see a way to get it
working. Committing what I had for reference.
Diffstat (limited to 'nohlslash.vim')
-rw-r--r-- | nohlslash.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nohlslash.vim b/nohlslash.vim new file mode 100644 index 0000000..9088cd1 --- /dev/null +++ b/nohlslash.vim @@ -0,0 +1,17 @@ +let s:nohlslash = 0 + +function! s:setup_nohlslash() + let s:nohlslash = !s:nohlslash +endfunction + +nnoremap <silent> <leader>a :call <SID>setup_nohlslash()<cr> + + +augroup nohlslash + autocmd! + autocmd CmdwinLeave * + \ if s:nohlslash | + \ echom 'test' + \ nohlsearch + \ endif +augroup END |