diff --git a/mappings.vim b/mappings.vim index b699801..13c6b70 100644 --- a/mappings.vim +++ b/mappings.vim @@ -167,4 +167,9 @@ nnoremap :call utils#StripTrailingWhitespaces() " check the syntax group of current cursor position nnoremap st :call utils#SynGroup() + +" Clear highlighting +if maparg('', 'n') ==# '' + nnoremap :nohlsearch=has('diff')?'diffupdate':'' +endif "}