From ed071740e882e9d6d2d608c59042d42226b580b8 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 1 May 2014 01:42:35 -0400 Subject: vimrc: change statusline colour depending on Insert/Normal mode When in Insert mode, the statusline background colour changes to green. In all other modes, the default reversed colours are used. This change only appears when the twilight256 colourscheme is set. --- vimrc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 7807541..0e9ce19 100644 --- a/vimrc +++ b/vimrc @@ -94,6 +94,10 @@ " * Set backupdir, directory, and undodir to be within ~/.vim so that my " filesystem doesn't clutter with *.swp files and the like " +" 2014.05.01: +" * Change status bar colour from white to green when switching into and +" out of insert mode +" " Pathogen @@ -197,6 +201,18 @@ set guifont=Monaco\ 10 colorscheme twilight256 +" Change statusline color when entering & leaving Insert mode +" Only when colourscheme is 'twilight256' +if exists('g:colors_name') && g:colors_name ==# 'twilight256' + augroup statusline_color_on_mode_change + autocmd! + + autocmd InsertEnter * highlight statusline ctermfg=120 ctermbg=234 + autocmd InsertLeave * highlight statusline ctermfg=15 ctermbg=235 + augroup END +endif + + " Plugins " ======= -- cgit v1.2.3