X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.vimrc;h=6400b455d760234b06d456f0280aa1b24d909444;hp=d4376a0665f5abe31140e285ef5f10dd7e918a65;hb=6262b23b90747594ff4c24cb9822973179911f98;hpb=6c82a1ef785f1d3ad8b31f20eb33d11ecccf4e8e diff --git a/.vimrc b/.vimrc index d4376a0..6400b45 100755 --- a/.vimrc +++ b/.vimrc @@ -9,6 +9,7 @@ se cindent se cinkeys=0{,0},0),:,!^F,o,O,e se showcmd se go=agilmrtT +se hlsearch se incsearch se ignorecase se smartcase @@ -33,7 +34,7 @@ endfun fun Cycle_List() call Iain_Vars() - let b:iainlist += 1 + let b:iainlist = b:iainlist + 1 if b:iainlist > 2 | let b:iainlist = 0 | endif if b:iainlist == 0 set nolist @@ -50,13 +51,13 @@ fun Show_List() call Iain_Vars() if b:iainlist == 0 " No list. - return " " + return " " elseif b:iainlist == 1 " Just tabs. - return "\\_" + return "_" else " Full list. - return "\.\$" + return "\$" endif endfun @@ -65,9 +66,9 @@ fun Cycle_StatusLine() call Iain_Vars() let b:iainhex = ! b:iainhex if b:iainhex - 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 + 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()}]%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 @@ -90,7 +91,11 @@ fun Invert_Case() endfun fun Show_Case() - if &ic | return "ca" | else | return "Ca" | endif + if &ic | return "c" | else | return "C" | endif +endfun + +fun Show_Tabstop() + return &ts endfun " Swap hex/decimal statusline with ,x @@ -99,6 +104,12 @@ map ,x :call Cycle_StatusLine(): 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: call Cycle_StatusLine()