git://git.iain.cx/iain
/
profile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added visual remap commands to find selection in visual mode.
[profile.git]
/
.vimrc
diff --git
a/.vimrc
b/.vimrc
index
4cc55d4
..
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
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
fun! Invert_Case()
let &ic = ! &ic
endfun
@@
-114,6
+118,9
@@
map Q4 :se ts=4<CR>:<CR>
" Change to ts=8 with Q8.
map Q8 :se ts=8<CR>:<CR>
" Change to ts=8 with Q8.
map Q8 :se ts=8<CR>:<CR>
+" Vim 7 has tabs. Default "next tab" mapping is gt. Add "previous tab" as gb.
+map gb :tabPrev<CR>
+
call Cycle_StatusLine()
au VimLeave * if exists("andyoldcols") | let &columns=andyoldcols | endif
call Cycle_StatusLine()
au VimLeave * if exists("andyoldcols") | let &columns=andyoldcols | endif
@@
-130,11
+137,6
@@
au BufLeave * if &ft == "c" || &ft == "cpp" | call CMode_unmap() | endif
au BufEnter * if &ft == "perl" | call PerlMode_map() | endif
au BufLeave * if &ft == "perl" | call PerlMode_unmap() | endif
au BufEnter * if &ft == "perl" | call PerlMode_map() | endif
au BufLeave * if &ft == "perl" | call PerlMode_unmap() | endif
-" ... For PHP files:
-
-au BufEnter * if &ft == "php" | call PHPMode_map() | endif
-au BufLeave * if &ft == "php" | call PHPMode_unmap() | endif
-
" ... For makefiles:
au BufEnter * if &ft == "make" | call MakeMode_map() | endif
" ... For makefiles:
au BufEnter * if &ft == "make" | call MakeMode_map() | endif
@@
-163,16
+165,6
@@
fun! PerlMode_unmap()
set foldmethod=manual
endfun
set foldmethod=manual
endfun
-fun! PHPMode_map()
- set nocindent
- set autoindent
-endfun
-
-fun! PHPMode_unmap()
- set noautoindent
- set cindent
-endfun
-
" ... For makefiles:
fun! MakeMode_map()
" ... For makefiles:
fun! MakeMode_map()