commit 9e3e71e392fc8ea4b04531218bdb31861f03d0fa
parent c7ab0ab9093cd92e5dcccf9b8b615108cc420adf
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Thu, 28 Feb 2019 16:22:36 +0100
Plugin to disable hlsearch when search is done
Former-commit-id: e244e5fa8c1baa5fd370d10df452b88483a7bbbc
Diffstat:
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/vim/map.vimrc b/vim/map.vimrc
@@ -24,9 +24,14 @@ nnoremap q: <Nop>
" Normal mode shortcuts
nnoremap <leader>dif :Diff<CR>
-nnoremap <leader>/ :noh<CR>
nnoremap <leader>b :ls<CR>:b<Space>
+" If vim-cool is not installed, add a map to
+" disable search highlight
+if !exists("g:loaded_cool")
+ nnoremap <leader>/ :noh<CR>
+endif
+
" Tab completion
inoremap <expr> <tab> InsertTabWrapper()
inoremap <s-tab> <c-p>
diff --git a/vim/plugins.vimrc b/vim/plugins.vimrc
@@ -62,6 +62,9 @@ Plug 'chrisbra/csv.vim'
" Display ANSI color codes
Plug 'vim-scripts/AnsiEsc.vim'
+" Disable hlsearch after finished searching
+Plug 'romainl/vim-cool'
+
" Easy table making (unnecessary because vimwiki has this built in)
" but leaving in case I need it sometime.
" Plug 'dhruvasagar/vim-table-mode'