summaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc5
1 files changed, 5 insertions, 0 deletions
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 <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