mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 13:50:58 +08:00
make :AirlineTheme a getter/setter
This commit is contained in:
parent
6b94397105
commit
150cd09d38
|
@ -154,7 +154,7 @@ example that you could add to your vimrc:
|
|||
COMMANDS *airline-commands*
|
||||
>
|
||||
:AirlineTheme {theme-name} *:AirlineTheme*
|
||||
Changes the current airline theme.
|
||||
Displayes or changes the current theme.
|
||||
|
||||
==============================================================================
|
||||
CONTRIBUTIONS *airline-contributions*
|
||||
|
|
|
@ -55,7 +55,13 @@ function! s:get_airline_themes(a, l, p)
|
|||
let files = split(globpath(&rtp, 'autoload/airline/themes/'.a:a.'*'), "\n")
|
||||
return map(files, 'fnamemodify(v:val, ":t:r")')
|
||||
endfunction
|
||||
command! -nargs=1 -complete=customlist,<sid>get_airline_themes AirlineTheme call airline#load_theme(<f-args>)
|
||||
function! s:airline_theme(...)
|
||||
if a:0
|
||||
call airline#load_theme(a:1)
|
||||
endif
|
||||
echo g:airline_theme
|
||||
endfunction
|
||||
command! -nargs=? -complete=customlist,<sid>get_airline_themes AirlineTheme call <sid>airline_theme(<f-args>)
|
||||
|
||||
augroup airline
|
||||
au!
|
||||
|
|
Loading…
Reference in New Issue
Block a user