check guard for all extensions. resolves #241.
This commit is contained in:
parent
55f524de77
commit
3a5a40730a
@ -1,14 +1,18 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
let s:empty_message = get(g:, 'airline#extensions#branch#empty_message',
|
|
||||||
\ get(g:, 'airline_branch_empty_message', ''))
|
|
||||||
let s:symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch)
|
|
||||||
|
|
||||||
let s:has_fugitive = exists('*fugitive#head')
|
let s:has_fugitive = exists('*fugitive#head')
|
||||||
let s:has_fugitive_detect = exists('*fugitive#detect')
|
let s:has_fugitive_detect = exists('*fugitive#detect')
|
||||||
let s:has_lawrencium = exists('*lawrencium#statusline')
|
let s:has_lawrencium = exists('*lawrencium#statusline')
|
||||||
|
|
||||||
|
if !s:has_fugitive && !s:has_lawrencium
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:empty_message = get(g:, 'airline#extensions#branch#empty_message',
|
||||||
|
\ get(g:, 'airline_branch_empty_message', ''))
|
||||||
|
let s:symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch)
|
||||||
|
|
||||||
function! airline#extensions#branch#get_head()
|
function! airline#extensions#branch#get_head()
|
||||||
let head = ''
|
let head = ''
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
if !exists('*bufferline#get_status_string')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let s:overwrite = get(g:, 'airline#extensions#bufferline#overwrite_variables', 1)
|
let s:overwrite = get(g:, 'airline#extensions#bufferline#overwrite_variables', 1)
|
||||||
|
|
||||||
function! airline#extensions#bufferline#init(ext)
|
function! airline#extensions#bufferline#init(ext)
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
if !get(g:, 'command_t_loaded', 0)
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
function! airline#extensions#commandt#apply(...)
|
function! airline#extensions#commandt#apply(...)
|
||||||
if bufname('%') ==# 'GoToFile'
|
if bufname('%') ==# 'GoToFile'
|
||||||
call airline#extensions#apply_left_override('CommandT', '')
|
call airline#extensions#apply_left_override('CommandT', '')
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
if !get(g:, 'loaded_csv', 0)
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let s:column_display = get(g:, 'airline#extensions#csv#column_display', 'Number')
|
let s:column_display = get(g:, 'airline#extensions#csv#column_display', 'Number')
|
||||||
|
|
||||||
function! airline#extensions#csv#get_column()
|
function! airline#extensions#csv#get_column()
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
if !get(g:, 'loaded_ctrlp', 0)
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let s:color_template = get(g:, 'airline#extensions#ctrlp#color_template', 'insert')
|
let s:color_template = get(g:, 'airline#extensions#ctrlp#color_template', 'insert')
|
||||||
|
|
||||||
function! airline#extensions#ctrlp#generate_color_map(dark, light, white)
|
function! airline#extensions#ctrlp#generate_color_map(dark, light, white)
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
" we don't actually want this loaded :P
|
||||||
|
finish
|
||||||
|
|
||||||
" Extension specific variables can be defined the usual fashion.
|
" Extension specific variables can be defined the usual fashion.
|
||||||
if !exists('g:airline#extensions#example#number_of_cats')
|
if !exists('g:airline#extensions#example#number_of_cats')
|
||||||
let g:airline#extensions#example#number_of_cats = 42
|
let g:airline#extensions#example#number_of_cats = 42
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
if !get(g:, 'loaded_signify', 0) && !get(g:, 'loaded_gitgutter', 0)
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let s:non_zero_only = get(g:, 'airline#extensions#hunks#non_zero_only', 0)
|
let s:non_zero_only = get(g:, 'airline#extensions#hunks#non_zero_only', 0)
|
||||||
let s:hunk_symbols = get(g:, 'airline#extensions#hunks#hunk_symbols', ['+', '~', '-'])
|
let s:hunk_symbols = get(g:, 'airline#extensions#hunks#hunk_symbols', ['+', '~', '-'])
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
if !exists(':SyntasticCheck')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
function! airline#extensions#syntastic#get_warnings()
|
function! airline#extensions#syntastic#get_warnings()
|
||||||
let errors = SyntasticStatuslineFlag()
|
let errors = SyntasticStatuslineFlag()
|
||||||
if strlen(errors) > 0
|
if strlen(errors) > 0
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
if !exists(':TagbarToggle')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let s:flags = get(g:, 'airline#extensions#tagbar#flags', '')
|
let s:flags = get(g:, 'airline#extensions#tagbar#flags', '')
|
||||||
|
|
||||||
" Arguments: current, sort, fname
|
" Arguments: current, sort, fname
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
if !exists(':UndotreeToggle')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
function! airline#extensions#undotree#apply(...)
|
function! airline#extensions#undotree#apply(...)
|
||||||
if exists('t:undotree')
|
if exists('t:undotree')
|
||||||
if &ft == 'undotree'
|
if &ft == 'undotree'
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
if !get(g:, 'loaded_unite', 0)
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
function! airline#extensions#unite#apply(...)
|
function! airline#extensions#unite#apply(...)
|
||||||
if &ft == 'unite'
|
if &ft == 'unite'
|
||||||
call a:1.add_section('airline_a', ' Unite ')
|
call a:1.add_section('airline_a', ' Unite ')
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
if !get(g:, 'virtualenv_loaded', 0)
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
function! airline#extensions#virtualenv#init(ext)
|
function! airline#extensions#virtualenv#init(ext)
|
||||||
call a:ext.add_statusline_func('airline#extensions#virtualenv#apply')
|
call a:ext.add_statusline_func('airline#extensions#virtualenv#apply')
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user