From f1ac2ec707a4bcf51e32fbfad590bd332842b4d2 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 27 Apr 2021 10:11:03 +0200 Subject: Use Ctrl-L to clear highlighting Take from vim-sensible --- .vimrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.vimrc b/.vimrc index 545b3d1..c83e1d3 100644 --- a/.vimrc +++ b/.vimrc @@ -8,6 +8,11 @@ set hidden " allow buffer switching without saving set hlsearch " Type-ahead find set incsearch +" Use to clear the highlighting of :set hlsearch. +" Taken from https://github.com/tpope/vim-sensible/blob/master/plugin/sensible.vim +if maparg('', 'n') ==# '' + nnoremap :nohlsearch=has('diff')?'diffupdate':'' +endif " Indent of 8, but no spaces set shiftwidth=8 -- cgit v1.2.3-54-g00ecf