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*
|
COMMANDS *airline-commands*
|
||||||
>
|
>
|
||||||
:AirlineTheme {theme-name} *:AirlineTheme*
|
:AirlineTheme {theme-name} *:AirlineTheme*
|
||||||
Changes the current airline theme.
|
Displayes or changes the current theme.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
CONTRIBUTIONS *airline-contributions*
|
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")
|
let files = split(globpath(&rtp, 'autoload/airline/themes/'.a:a.'*'), "\n")
|
||||||
return map(files, 'fnamemodify(v:val, ":t:r")')
|
return map(files, 'fnamemodify(v:val, ":t:r")')
|
||||||
endfunction
|
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
|
augroup airline
|
||||||
au!
|
au!
|
||||||
|
|
Loading…
Reference in New Issue