X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.vimrc;h=4c10a31f681ded33d5f3c7d1ff9f23201b7ad651;hp=ba4ec764204933fbdad2b5da05a26c224c7f44ec;hb=f47e88a5316392ef25aff9420f1c73c85f5e91fa;hpb=a26d4be47a73651f248068ab25d5b38a09451b10 diff --git a/.vimrc b/.vimrc index ba4ec76..4c10a31 100755 --- a/.vimrc +++ b/.vimrc @@ -98,18 +98,24 @@ fun! Show_Tabstop() return &ts endfun -" Swap hex/decimal statusline with ,x -map ,x :call Cycle_StatusLine(): -" Swap case-sensitivity with ,c. -map ,c :call Invert_Case(): -" Cycle list styles with ,l. -map ,l :call Cycle_List(): -" Change to ts=2 with ,2. -map ,2 :se ts=2: -" Change to ts=4 with ,4. -map ,4 :se ts=4: -" Change to ts=8 with ,8. -map ,8 :se ts=8: +" Clear Q as we will use it for commands. +map Q + +" Swap hex/decimal statusline with Qx +map Qx :call Cycle_StatusLine(): +" Swap case-sensitivity with Qc. +map Qc :call Invert_Case(): +" Cycle list styles with Ql. +map Ql :call Cycle_List(): +" Change to ts=2 with Q2. +map Q2 :se ts=2: +" Change to ts=4 with Q4. +map Q4 :se ts=4: +" Change to ts=8 with Q8. +map Q8 :se ts=8: + +" Vim 7 has tabs. Default "next tab" mapping is gt. Add "previous tab" as gb. +map gb :tabPrev call Cycle_StatusLine() @@ -127,11 +133,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 -" ... 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 @@ -160,16 +161,6 @@ fun! PerlMode_unmap() 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()