From: Simon Ruderich Date: Fri, 2 Mar 2012 13:34:03 +0000 (+0100) Subject: vimrc: Use 'noignorecase' for * and # in visual mode. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=73749039e11bbb4798284e3ad492b0fea11a929d;hp=be676bfae2c0ef626e3c132ab9c59f147116aec5;p=config%2Fdotfiles.git vimrc: Use 'noignorecase' for * and # in visual mode. --- diff --git a/vimrc b/vimrc index 20685e9..9ae5f86 100644 --- a/vimrc +++ b/vimrc @@ -368,7 +368,9 @@ if has('eval') function! s:VSetSearch() let l:temp = @@ normal! gvy - let @/ = '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g') + " Added \C to force 'noignorecase' while searching the current visual + " selection. I want to search for the exact string in this case. + let @/ = '\C' . '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g') let @@ = l:temp endfunction vnoremap * :call VSetSearch()//