From: Iain Patterson Date: Fri, 8 Aug 2008 14:31:47 +0000 (+0000) Subject: The Highlight_StatusLine() function is valid code in version 6. Move it out of the... X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=185902dd63a6f0ccee4dd6ef6651f3caa636d04c;p=profile.git The Highlight_StatusLine() function is valid code in version 6. Move it out of the version 7 section so we can get a consistent statusline colour at startup. git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@126 6be0d1a5-5cfe-0310-89b6-964be062b18b --- diff --git a/.vimrc b/.vimrc index 05646ee..baddfed 100644 --- a/.vimrc +++ b/.vimrc @@ -348,15 +348,7 @@ map Qq :call Cycle_Quickfix(): " updated as a side-effect. map Qs :filetype detect: -endif - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Handle options only available in Vim 7 and above. -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -if version >= "700" -version 7.0 - -" Change status bar colour when entering insert mode. +" Change status bar colour when various things happen. fun! Highlight_StatusLine(flag) " Get current status. call Iain_Vars() @@ -402,13 +394,21 @@ fun! Highlight_StatusLine(flag) exec "highlight StatusLine guifg=white guibg=" . s:colour . " ctermbg=white ctermfg=" . s:termcolour endfun +call Highlight_StatusLine("") +endif + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Handle options only available in Vim 7 and above. +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if version >= "700" +version 7.0 + au CursorHoldI * call Highlight_StatusLine("H") au CursorMovedI * call Highlight_StatusLine("h") au FocusGained * call Highlight_StatusLine("F") au FocusLost * call Highlight_StatusLine("f") au InsertEnter * call Highlight_StatusLine("I") au InsertLeave * call Highlight_StatusLine("i") -call Highlight_StatusLine("") " Make diffs vertical by default. se diffopt+=vertical