diff options
author | Teddy Wing | 2014-05-01 01:42:35 -0400 |
---|---|---|
committer | Teddy Wing | 2014-05-01 01:43:32 -0400 |
commit | ed071740e882e9d6d2d608c59042d42226b580b8 (patch) | |
tree | 14bb4851c48831452812d11f329164af1c04efd2 /vimrc | |
parent | ef30c20c778ea80e03cc9799e0da939a35936850 (diff) | |
download | dotvim-ed071740e882e9d6d2d608c59042d42226b580b8.tar.bz2 |
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.
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 " ======= |