-:autocmd!
-autocmd Syntax c se cinkeys=0{,0},0),:,0#,!^F,o,O,e
-autocmd Syntax perl se cinkeys=0{,0},0),:,!^F,o,O,e
-autocmd Syntax php se cinkeys=0{,0},0),:,!^F,o,O,e
+se tags=~/.ctags
+
+fun Invert_Case()
+ let &ic = ! &ic
+endfun
+
+fun Show_Case()
+ if &ic | return "ca" | else | return "Ca" | endif
+endfun
+
+set statusline=%2n\:\ %<%t\ [%{Show_List()}][%{Show_Case()}]%y%m%r%=%b\ 0\x%02B\ (%3.6c,%-4.6l)\ %4.6L\ %P
+" Swap case-sensitivity with ,c.
+map ,c :call Invert_Case()<CR>:<CR>
+" Cycle list styles with ,l.
+map ,l :call Cycle_List()<CR>:<CR>
+
+au VimLeave * if exists("andyoldcols") | let &columns=andyoldcols | endif
+
+" Autocommands to setup features we only want in certain modes...
+
+" ... For C/C++ files:
+
+au BufEnter * if &ft == "c" || &ft == "cpp" | call CMode_map() | endif
+au BufLeave * if &ft == "c" || &ft == "cpp" | call CMode_unmap() | endif
+
+" ... For Perl files:
+
+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
+au BufLeave * if &ft == "make" | call MakeMode_unmap() | endif
+
+" Functions to call when we enter/leave a programming language buffer...
+
+" ... For C-like languages:
+
+fun CMode_map()
+ set cinkeys=0{,0},:,0#,!^F,o,O,e
+ set cinwords=if,else,while,do,for,switch
+endfun
+
+fun CMode_unmap()
+endfun
+
+" .. For Perl files:
+
+fun PerlMode_map()
+ set cinkeys=0{,0},:,!^F,o,O,e
+ set cinwords=if,else,while,do,for,eval
+ set foldmethod=indent
+endfun
+
+fun PerlMode_unmap()
+ set foldmethod=manual
+endfun
+
+fun PHPMode_map()
+ set nocindent
+ set autoindent
+ set foldmethod=indent
+endfun
+
+fun PHPMode_unmap()
+ set noautoindent
+ set cindent
+ set foldmethod=manual
+endfun
+
+" ... For makefiles:
+
+fun MakeMode_map()
+ set list
+ set noexpandtab
+endfun
+
+fun MakeMode_unmap()
+ set nolist
+ set expandtab
+endfun