" $Id$
+se nocp
se ts=2
se bs=2
se sw=2
:autocmd!
" Initialise list format per buffer.
-au BufEnter * let b:iainlist = 0
+au BufEnter * let b:iainlist = 0 | let b:iainhex = 1 | call Cycle_StatusLine()
fun Cycle_List()
let b:iainlist += 1
endif
endfun
+" Cycle between hex and decimal display of toolbar stuff
+fun Cycle_StatusLine()
+ 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
+ else
+ set statusline=%2n\:\ %<%f\ [%{Show_List()}][%{Show_Case()}]%y%m%r%=%b\ (%3.6c,%-4.6l)\ %4.6o\ \|\ %4.6L\ %P
+ endif
+endfun
+
" Save the current window width so if we change it we can restore it
" when we quit.
let andyoldcols=&columns
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 hex/decimal statusline with ,x
+map ,x :call Cycle_StatusLine()<CR>:<CR>
" Swap case-sensitivity with ,c.
map ,c :call Invert_Case()<CR>:<CR>
" Cycle list styles with ,l.