mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 20:15:45 +08:00
Add a separate function for returning all available themes
This commit is contained in:
parent
49671d0a11
commit
b20e181bc8
|
@ -124,3 +124,8 @@ endfunction
|
||||||
function! airline#util#doautocmd(event)
|
function! airline#util#doautocmd(event)
|
||||||
exe printf("silent doautocmd %s User %s", s:nomodeline, a:event)
|
exe printf("silent doautocmd %s User %s", s:nomodeline, a:event)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! airline#util#themes(match)
|
||||||
|
let files = split(globpath(&rtp, 'autoload/airline/themes/'.a:match.'*'), "\n")
|
||||||
|
return map(files, 'fnamemodify(v:val, ":t:r")')
|
||||||
|
endfunction
|
||||||
|
|
|
@ -146,8 +146,7 @@ function! s:airline_toggle()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:get_airline_themes(a, l, p)
|
function! s:get_airline_themes(a, l, p)
|
||||||
let files = split(globpath(&rtp, 'autoload/airline/themes/'.a:a.'*'), "\n")
|
return airline#util#themes(a:a)
|
||||||
return map(files, 'fnamemodify(v:val, ":t:r")')
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:airline_theme(...)
|
function! s:airline_theme(...)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user