From 476e2758e110defd23e28a60e5e8796830ad1f45 Mon Sep 17 00:00:00 2001 From: Stephen Bennett Date: Thu, 5 Sep 2013 00:56:54 -0600 Subject: [PATCH] Option to clear instead of toggle search highlighting --- .vimrc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index c7f2f6e..1d821d5 100644 --- a/.vimrc +++ b/.vimrc @@ -317,8 +317,16 @@ nmap f8 :set foldlevel=8 nmap f9 :set foldlevel=9 - " Toggle search highlighting - nmap / :set invhlsearch + " 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 / :nohlsearch + else + nmap / :set invhlsearch + endif + " Find merge conflict markers map fc /\v^[<\|=>]{7}( .*\|$)