:autocmd!
" Set up our variables.
-fun Iain_Vars()
+fun! Iain_Vars()
if ! exists("b:iainlist") | let b:iainlist = 0 | endif
if ! exists("b:iainhex") | let b:iainhex = 1 | endif
endfun
-fun Cycle_List()
+fun! Cycle_List()
call Iain_Vars()
let b:iainlist = b:iainlist + 1
if b:iainlist > 2 | let b:iainlist = 0 | endif
endif
endfun
-fun Show_List()
+fun! Show_List()
call Iain_Vars()
if b:iainlist == 0
" No list.
endif
endfun
-" Cycle between hex and decimal display of toolbar stuff
-fun Cycle_StatusLine()
+" Cycle between hex and decimal display of toolbar stuff.
+fun! Cycle_StatusLine()
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()}%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()}%Y%M%R]\ %=%b\ (%3.6c,%-4.6l)\ %4.6o\ \|\ %4.6L\ %P
endif
endfun
map <C-"> viwvbi"<ESC>ea"<ESC>
map - yyp:s/./-/g<RETURN>:let @/=''<RETURN>:<RETURN>
map = yyp:s/./=/g<RETURN>:let @/=''<RETURN>:<RETURN>
-command W :w
+command! W :w
se tags=~/.ctags
-fun Invert_Case()
+fun! Invert_Case()
let &ic = ! &ic
endfun
-fun Show_Case()
+fun! Show_Case()
if &ic | return "c" | else | return "C" | endif
endfun
-fun Show_Tabstop()
+fun! Show_Tabstop()
return &ts
endfun
" ... For C-like languages:
-fun CMode_map()
+fun! CMode_map()
set cinkeys=0{,0},:,0#,!^F,o,O,e
set cinwords=if,else,while,do,for,switch
endfun
-fun CMode_unmap()
+fun! CMode_unmap()
endfun
" .. For Perl files:
-fun PerlMode_map()
+fun! PerlMode_map()
set cinkeys=0{,0},:,!^F,o,O,e
set cinwords=if,else,while,do,for,eval
endfun
-fun PerlMode_unmap()
+fun! PerlMode_unmap()
set foldmethod=manual
endfun
-fun PHPMode_map()
+fun! PHPMode_map()
set nocindent
set autoindent
endfun
-fun PHPMode_unmap()
+fun! PHPMode_unmap()
set noautoindent
set cindent
endfun
" ... For makefiles:
-fun MakeMode_map()
+fun! MakeMode_map()
set list
set noexpandtab
endfun
-fun MakeMode_unmap()
+fun! MakeMode_unmap()
set nolist
set expandtab
endfun