9 se cinkeys=0{,0},0),:,!^F,o,O,e
19 se guifont=Bitstream\ Vera\ Sans\ Mono\ 12
22 highlight StatusLine guifg=white guibg=blue ctermbg=white ctermfg=blue
24 se guifont=Bitstream_Vera_Sans_Mono:h10:cANSI
28 " Set up our variables.
30 if ! exists("b:iainlist") | let b:iainlist = 0 | endif
31 if ! exists("b:iainhex") | let b:iainhex = 1 | endif
37 if b:iainlist > 2 | let b:iainlist = 0 | endif
40 elseif b:iainlist == 1
41 set lcs=tab:\\_,trail:_,extends:<,precedes:>
44 set lcs=tab:\\_,trail:_,extends:<,precedes:>,eol:$
54 elseif b:iainlist == 1
63 " Cycle between hex and decimal display of toolbar stuff
64 fun Cycle_StatusLine()
66 let b:iainhex = ! b:iainhex
68 set statusline=%2n\:\ %<%f\ [%{Show_List()}][%{Show_Case()}]%y%m%r\ %=0\x%02B\ (%3.6c,%-4.6l)\ 0\x%04.6O\ \|\ %4.6L\ %P
70 set statusline=%2n\:\ %<%f\ [%{Show_List()}][%{Show_Case()}]%y%m%r\ %=%b\ (%3.6c,%-4.6l)\ %4.6o\ \|\ %4.6L\ %P
74 " Save the current window width so if we change it we can restore it
76 let andyoldcols=&columns
78 " This expands the terminal to display two 80-column files side-by-side
79 " when vim is opened in diff mode.
80 if &diff | let &columns = 164 | endif
82 map <C-"> viwvbi"<ESC>ea"<ESC>
83 map - yyp:s/./-/g<RETURN>:let @/=''<RETURN>:<RETURN>
84 map = yyp:s/./=/g<RETURN>:let @/=''<RETURN>:<RETURN>
93 if &ic | return "ca" | else | return "Ca" | endif
96 " Swap hex/decimal statusline with ,x
97 map ,x :call Cycle_StatusLine()<CR>:<CR>
98 " Swap case-sensitivity with ,c.
99 map ,c :call Invert_Case()<CR>:<CR>
100 " Cycle list styles with ,l.
101 map ,l :call Cycle_List()<CR>:<CR>
103 call Cycle_StatusLine()
105 au VimLeave * if exists("andyoldcols") | let &columns=andyoldcols | endif
107 " Autocommands to setup features we only want in certain modes...
109 " ... For C/C++ files:
111 au BufEnter * if &ft == "c" || &ft == "cpp" | call CMode_map() | endif
112 au BufLeave * if &ft == "c" || &ft == "cpp" | call CMode_unmap() | endif
114 " ... For Perl files:
116 au BufEnter * if &ft == "perl" | call PerlMode_map() | endif
117 au BufLeave * if &ft == "perl" | call PerlMode_unmap() | endif
121 au BufEnter * if &ft == "php" | call PHPMode_map() | endif
122 au BufLeave * if &ft == "php" | call PHPMode_unmap() | endif
126 au BufEnter * if &ft == "make" | call MakeMode_map() | endif
127 au BufLeave * if &ft == "make" | call MakeMode_unmap() | endif
129 " Functions to call when we enter/leave a programming language buffer...
131 " ... For C-like languages:
134 set cinkeys=0{,0},:,0#,!^F,o,O,e
135 set cinwords=if,else,while,do,for,switch
144 set cinkeys=0{,0},:,!^F,o,O,e
145 set cinwords=if,else,while,do,for,eval
149 set foldmethod=manual