fix indentation.
This commit is contained in:
parent
93eb0389b9
commit
2d049949f0
|
@ -54,47 +54,48 @@ function! s:airline_toggle()
|
||||||
au!
|
au!
|
||||||
augroup END
|
augroup END
|
||||||
augroup! airline
|
augroup! airline
|
||||||
if exists("s:stl")
|
|
||||||
let &stl = s:stl
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
let s:stl = &stl
|
|
||||||
augroup airline
|
|
||||||
autocmd!
|
|
||||||
|
|
||||||
autocmd CmdwinEnter *
|
if exists("s:stl")
|
||||||
\ call airline#add_statusline_func('airline#cmdwinenter')
|
let &stl = s:stl
|
||||||
\ | call <sid>on_window_changed()
|
|
||||||
autocmd CmdwinLeave * call airline#remove_statusline_func('airline#cmdwinenter')
|
|
||||||
|
|
||||||
autocmd ColorScheme * call <sid>on_colorscheme_changed()
|
|
||||||
autocmd WinEnter,BufWinEnter,FileType,BufUnload,ShellCmdPost,VimResized *
|
|
||||||
\ 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
|
|
||||||
if s:airline_initialized
|
|
||||||
call <sid>on_window_changed()
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endfunction
|
else
|
||||||
|
let s:stl = &stl
|
||||||
|
augroup airline
|
||||||
|
autocmd!
|
||||||
|
|
||||||
function! s:get_airline_themes(a, l, p)
|
autocmd CmdwinEnter *
|
||||||
let files = split(globpath(&rtp, 'autoload/airline/themes/'.a:a.'*'), "\n")
|
\ call airline#add_statusline_func('airline#cmdwinenter')
|
||||||
return map(files, 'fnamemodify(v:val, ":t:r")')
|
\ | call <sid>on_window_changed()
|
||||||
endfunction
|
autocmd CmdwinLeave * call airline#remove_statusline_func('airline#cmdwinenter')
|
||||||
function! s:airline_theme(...)
|
|
||||||
if a:0
|
autocmd ColorScheme * call <sid>on_colorscheme_changed()
|
||||||
call airline#switch_theme(a:1)
|
autocmd WinEnter,BufWinEnter,FileType,BufUnload,ShellCmdPost,VimResized *
|
||||||
else
|
\ call <sid>on_window_changed()
|
||||||
echo g:airline_theme
|
|
||||||
|
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
|
||||||
|
if s:airline_initialized
|
||||||
|
call <sid>on_window_changed()
|
||||||
endif
|
endif
|
||||||
endfunction
|
endif
|
||||||
command! -nargs=? -complete=customlist,<sid>get_airline_themes AirlineTheme call <sid>airline_theme(<f-args>)
|
endfunction
|
||||||
command! AirlineToggleWhitespace call airline#extensions#whitespace#toggle()
|
|
||||||
command! AirlineToggle call <sid>airline_toggle()
|
|
||||||
|
|
||||||
call <sid>airline_toggle()
|
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
|
||||||
|
function! s:airline_theme(...)
|
||||||
|
if a:0
|
||||||
|
call airline#switch_theme(a:1)
|
||||||
|
else
|
||||||
|
echo g:airline_theme
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
command! -nargs=? -complete=customlist,<sid>get_airline_themes AirlineTheme call <sid>airline_theme(<f-args>)
|
||||||
|
command! AirlineToggleWhitespace call airline#extensions#whitespace#toggle()
|
||||||
|
command! AirlineToggle call <sid>airline_toggle()
|
||||||
|
|
||||||
|
call <sid>airline_toggle()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue