diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2021-04-27 10:11:03 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2021-04-27 10:11:03 +0200 |
commit | f1ac2ec707a4bcf51e32fbfad590bd332842b4d2 (patch) | |
tree | d36d29027d9259074134932768f7ec9d14324d23 | |
parent | beee3e97d9bd204f30981b0e7d9794b3bb5297a4 (diff) |
Use Ctrl-L to clear highlighting
Take from vim-sensible
-rw-r--r-- | .vimrc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -8,6 +8,11 @@ set hidden " allow buffer switching without saving set hlsearch " Type-ahead find set incsearch +" Use <C-L> to clear the highlighting of :set hlsearch. +" Taken from https://github.com/tpope/vim-sensible/blob/master/plugin/sensible.vim +if maparg('<C-L>', 'n') ==# '' + nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L> +endif " Indent of 8, but no spaces set shiftwidth=8 |