>>> sender: "Mark Volkmann" date: "Wed, Apr 26, 2006 at 09:51:45PM +0900" <<<EOQ
> On 4/26/06, Alexandru E. Ungur <alexandru / globalterrasoft.ro> wrote:
> 
> > I came up with a rather nice solution to it: I use the entire statusbar's
> > background color to tell me where I am: RED background == edit mode, GREEN
> > background == normal mode.
> 
> Can you share what you put in your .vimrc to configure that?
Sure, here you go:

--- .vimrc excerpt for statusbar highlighting ---
" Only do this part when compiled with support for autocommands,
" You better have Vim7 'cause this does all the magic :)
if has("autocmd")
  augroup InsertStatus
    au InsertEnter * hi StatusLine term=inverse,bold cterm=inverse,bold ctermfg=red ctermbg=white
    au InsertLeave * hi StatusLine term=inverse,bold cterm=inverse,bold ctermfg=green ctermbg=white
  augroup END
endif

" ensure statusline is always shown
set ls=2
" custom statusline
set statusline=%<file[%n]:\ %f\ %y%=\ %3lx%02c\ [%1*%M%*%R%H]\ %2P\ 
" initial statusline highlighting
hi StatusLine   term=inverse,bold cterm=inverse,bold ctermfg=green ctermbg=white
hi StatusLineNC term=inverse,bold cterm=inverse,bold ctermfg=gray
hi User1 term=inverse,bold cterm=inverse,bold ctermfg=red
--- end ---

Adjust the colors as you see fit. I noticed the green looks too ugly on
plain xterm, but I use Terminal (http://www.os-cillation.com/index.php?id=42&L=5)
and it looks quite nice there.

BTW, you also get a 'red spot' on the green statusbar when you have
unsaved changes, that feels nice too ;)


Good luck,
Alex