aboutsummaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorTeddy Wing2014-05-01 01:42:35 -0400
committerTeddy Wing2014-05-01 01:43:32 -0400
commited071740e882e9d6d2d608c59042d42226b580b8 (patch)
tree14bb4851c48831452812d11f329164af1c04efd2 /vimrc
parentef30c20c778ea80e03cc9799e0da939a35936850 (diff)
downloaddotvim-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--vimrc16
1 files changed, 16 insertions, 0 deletions
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
" =======