From 73749039e11bbb4798284e3ad492b0fea11a929d Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 2 Mar 2012 14:34:03 +0100 Subject: [PATCH] vimrc: Use 'noignorecase' for * and # in visual mode. --- vimrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()// -- 2.44.1