Added visual remap commands to find selection in visual mode.
authorIain Patterson <me@iain.cx>
Tue, 8 Aug 2006 15:36:42 +0000 (15:36 +0000)
committerIain Patterson <me@iain.cx>
Tue, 8 Aug 2006 15:36:42 +0000 (15:36 +0000)
git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@30 6be0d1a5-5cfe-0310-89b6-964be062b18b

.vimrc

diff --git a/.vimrc b/.vimrc
index 4c10a31..5c3d17e 100755 (executable)
--- a/.vimrc
+++ b/.vimrc
@@ -86,6 +86,10 @@ map = yyp:s/./=/g<RETURN>:let @/=''<RETURN>:<RETURN>
 command! W :w
 se tags=~/.ctags
 
+" Make * and # work the way you expect in visual mode.
+vnoremap * y/\V<C-R>=substitute(escape(@@,"/\\"),"\n","\\\\n","ge")<CR><CR>
+vnoremap # y?\V<C-R>=substitute(escape(@@,"?\\"),"\n","\\\\n","ge")<CR><CR>
+
 fun! Invert_Case()
   let &ic = ! &ic
 endfun