X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=vimrc;h=9ae5f86cf2f6a52392b5a1fcd7c10b664a6c4c4e;hb=73749039e11bbb4798284e3ad492b0fea11a929d;hp=20685e94930d75e6b0ba75f06fea735d339f4bf1;hpb=be676bfae2c0ef626e3c132ab9c59f147116aec5;p=config%2Fdotfiles.git 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()//