From: Iain Patterson Date: Thu, 15 Dec 2005 11:31:56 +0000 (+0000) Subject: Explicitly set nocp. X-Git-Url: http://git.iain.cx/?p=profile.git;a=commitdiff_plain;h=18de6af3b2f218608649b3f9371eff6457afd6c5;ds=inline Explicitly set nocp. Show file byte offset in status line. Cycle hex/decimal status line stuff with ,x. git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@12 6be0d1a5-5cfe-0310-89b6-964be062b18b --- diff --git a/.vimrc b/.vimrc index 5a3622a..468aefc 100755 --- a/.vimrc +++ b/.vimrc @@ -1,4 +1,5 @@ " $Id$ +se nocp se ts=2 se bs=2 se sw=2 @@ -25,7 +26,7 @@ endif :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 @@ -54,6 +55,16 @@ fun Show_List() 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 @@ -76,7 +87,8 @@ 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 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.