Option to clear instead of toggle search highlighting

This commit is contained in:
Stephen Bennett 2013-09-05 00:56:54 -06:00 committed by spf13
parent a8c04ef701
commit 476e2758e1

12
.vimrc
View File

@ -317,8 +317,16 @@
nmap <leader>f8 :set foldlevel=8<CR>
nmap <leader>f9 :set foldlevel=9<CR>
" Toggle search highlighting
nmap <silent> <leader>/ :set invhlsearch<CR>
" Most prefer to toggle search highlighting rather than clear the current
" search results. To clear search highlighting rather than toggle it on
" and off, add the following to your .vimrc.before.local file:
" let g:spf13_clear_search_highlight = 1
if exists('g:spf13_clear_search_highlight')
nmap <silent> <leader>/ :nohlsearch<CR>
else
nmap <silent> <leader>/ :set invhlsearch<CR>
endif
" Find merge conflict markers
map <leader>fc /\v^[<\|=>]{7}( .*\|$)<CR>