call Iain_Vars()
let b:iainhex = ! b:iainhex
if b:iainhex
- set statusline=%2n\:\ %<%f\ [%{Show_List()}%{Show_Case()}%{Show_Tabstop()}%Y%M%R]\ %=0\x%02B\ (%3.6c,%-4.6l)\ 0\x%04.6O\ \|\ %4.6L\ %P
+ set statusline=%2n\:\ %<%f\ [%{Show_List()}%{Show_Case()}%{Show_Tabstop()}%{Show_Paste()}%Y%M%R]\ %=0\x%02B\ (%3.6c,%-4.6l)\ 0\x%04.6O\ \|\ %4.6L\ %P
else
- set statusline=%2n\:\ %<%f\ [%{Show_List()}%{Show_Case()}%{Show_Tabstop()}%Y%M%R]\ %=%b\ (%3.6c,%-4.6l)\ %4.6o\ \|\ %4.6L\ %P
+ set statusline=%2n\:\ %<%f\ [%{Show_List()}%{Show_Case()}%{Show_Tabstop()}%{Show_Paste()}%Y%M%R]\ %=%b\ (%3.6c,%-4.6l)\ %4.6o\ \|\ %4.6L\ %P
endif
endfun
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
return &ts
endfun
+fun! Show_Paste()
+ if &paste | return "p" | else | return "" | endif
+endfun
+
" Clear Q as we will use it for commands.
map Q <Nop>
" 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
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
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()