Created
September 17, 2012 04:45
-
-
Save keikun17/3735615 to your computer and use it in GitHub Desktop.
Toggle Powerline (Solarized light)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ======== Glorious background toggling ======== | |
" requires solarizedLightLC theme from : https://github.com/pearofducks/vim-powerline/blob/develop/autoload/Powerline/Colorschemes/solarizedLightLC.vim | |
" put this theme under this directory : ~/.yadr/vim/bundle/skwp-vim-powerline/autoload/Powerline/Colorschemes/ | |
let g:powerline_dark_theme = 'skwp' | |
let g:powerline_light_theme = 'solarizedLightLC' | |
function! EmoModeOn() | |
set background=dark | |
let g:Powerline_colorscheme = g:powerline_dark_theme | |
endfunction | |
function! EmoModeOff() | |
set background=light | |
let g:Powerline_colorscheme = g:powerline_light_theme | |
endfunction | |
function! ToggleEmoMode() | |
echo 'emo mode called' | |
if &background == "dark" | |
call EmoModeOff() | |
elseif &background == "light" | |
call EmoModeOn() | |
end | |
PowerlineReloadColorscheme | |
endfunction | |
map <F5> :call ToggleEmoMode()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment