aboutsummaryrefslogtreecommitdiff
path: root/mappings.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2020-03-17 14:21:32 +0800
committerGitHub <noreply@github.com>2020-03-17 14:21:32 +0800
commitbffd6bac7070dae9ec60e615709104b5878d9006 (patch)
tree8ecb7fc8f527d5be5d0e86b2cd27adf4207445f4 /mappings.vim
parent99e4c9cfd6ee11a66630b058a46a367330fc014a (diff)
Update: add mapping to clear highlighting
Diffstat (limited to 'mappings.vim')
-rw-r--r--mappings.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/mappings.vim b/mappings.vim
index b699801..13c6b70 100644
--- a/mappings.vim
+++ b/mappings.vim
@@ -167,4 +167,9 @@ nnoremap <silent> <leader><Space> :call utils#StripTrailingWhitespaces()<CR>
" check the syntax group of current cursor position
nnoremap <silent> <leader>st :call utils#SynGroup()<CR>
+
+" Clear highlighting
+if maparg('<C-L>', 'n') ==# ''
+ nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
+endif
"}