aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorTeddy Wing2019-12-14 18:54:38 +0100
committerTeddy Wing2019-12-14 18:54:38 +0100
commit2c9242d8640bbf491bb01274328f71272f322a22 (patch)
treee6bcdaf5c56347a253bbffec14930b2c318008b6 /autoload
parent26dbeebebf9ff0315b1abd6925a451c080a66d56 (diff)
downloadvim-nohai-2c9242d8640bbf491bb01274328f71272f322a22.tar.bz2
s:AddMapping(): Silence `:nohlsearch` output
The `silent!` command I was using didn't silence the `:nohlsearch` output after pressing `<CR>`. Use `<silent>` in the mapping instead to silence it, allowing the Nohai search commands to produce output similar to the regular `/` and `?` commands.
Diffstat (limited to 'autoload')
-rw-r--r--autoload/nohai.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/nohai.vim b/autoload/nohai.vim
index 726d4c8..a99c5e0 100644
--- a/autoload/nohai.vim
+++ b/autoload/nohai.vim
@@ -1,6 +1,6 @@
" Remaps <CR> in command mode to run `nohlsearch` after accepting the command.
function! s:AddMapping()
- silent! cnoremap <expr> <CR> <SID>CRAndNohlsearch()
+ cnoremap <expr> <silent> <CR> <SID>CRAndNohlsearch()
endfunction
" Removes the Nohai <CR> cmap.