From bffd6bac7070dae9ec60e615709104b5878d9006 Mon Sep 17 00:00:00 2001 From: jdhao Date: Tue, 17 Mar 2020 14:21:32 +0800 Subject: [PATCH] Update: add mapping to clear highlighting --- mappings.vim | 5 +++++ 1 file changed, 5 insertions(+) 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 "}