auto-source themes when they are changed.

This commit is contained in:
bling 2013-08-25 21:34:26 -04:00
parent 609b4ab573
commit 39c8dcd950
2 changed files with 10 additions and 2 deletions

View File

@ -121,7 +121,7 @@ Contributions and pull requests are welcome. Please take note of the following
# License # License
MIT license. Copyright (c) 2013 Bailey Ling. MIT License. Copyright (c) 2013 Bailey Ling.
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/bling/vim-airline/trend.png)](https://bitdeli.com/free "Bitdeli Badge") [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/bling/vim-airline/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

View File

@ -12,6 +12,10 @@ function! s:check_defined(variable, default)
endif endif
endfunction endfunction
if exists('g:airline_enable_fugitive') || exists('g:airline_fugitive_prefix')
echom 'The g:airline_enable_fugitive and g:airline_fugitive_prefix variables are obsolete. Please read the documentation about the branch extension.'
endif
call s:check_defined('g:airline_left_sep', get(g:, 'airline_powerline_fonts', 0)?"":">") call s:check_defined('g:airline_left_sep', get(g:, 'airline_powerline_fonts', 0)?"":">")
call s:check_defined('g:airline_left_alt_sep', get(g:, 'airline_powerline_fonts', 0)?"":">") call s:check_defined('g:airline_left_alt_sep', get(g:, 'airline_powerline_fonts', 0)?"":">")
call s:check_defined('g:airline_right_sep', get(g:, 'airline_powerline_fonts', 0)?"":"<") call s:check_defined('g:airline_right_sep', get(g:, 'airline_powerline_fonts', 0)?"":"<")
@ -116,6 +120,10 @@ function! s:airline_toggle()
autocmd ColorScheme * call <sid>on_colorscheme_changed() autocmd ColorScheme * call <sid>on_colorscheme_changed()
autocmd WinEnter,BufWinEnter,FileType,BufUnload,ShellCmdPost * autocmd WinEnter,BufWinEnter,FileType,BufUnload,ShellCmdPost *
\ call <sid>on_window_changed() \ call <sid>on_window_changed()
autocmd BufWritePost */autoload/airline/themes/*.vim
\ exec 'source '.split(globpath(&rtp, 'autoload/airline/themes/'.g:airline_theme.'.vim', 1), '\n')[0]
\ | call airline#load_theme()
augroup END augroup END
if s:airline_initialized if s:airline_initialized
call <sid>on_window_changed() call <sid>on_window_changed()