define the rest of the extensions.

This commit is contained in:
Bailey Ling
2013-08-30 22:07:45 +00:00
parent 19910a26cb
commit c6d996d5ca
6 changed files with 6 additions and 16 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ function! airline#extensions#example#init(ext)
" Here we define a new part for the plugin. This allows users to place this
" extension in arbitrary locations.
let g:airline_parts.cats = '%{airline#extensions#example#get_cats()}'
call airline#parts#define_raw('cats', '%{airline#extensions#example#get_cats()}')
" Next up we add a funcref so that we can run some code prior to the
" statusline getting modifed.
@@ -28,7 +28,7 @@ function! airline#extensions#example#apply(...)
" Let's use a helper function. It will take care of ensuring that the
" window-local override exists (and create one based on the global
" airline_section if not), and prepend to it.
call airline#extensions#prepend_to_section('x', g:airline_parts.cats)
call airline#extensions#prepend_to_section('x', airline#parts#get('cats').raw)
endif
endfunction
+1 -1
View File
@@ -10,6 +10,6 @@ function! airline#extensions#syntastic#get_warnings()
endfunction
function! airline#extensions#syntastic#init(ext)
let g:airline_parts.syntastic = '%{airline#extensions#syntastic#get_warnings()}'
call airline#parts#define_function('syntastic', 'airline#extensions#syntastic#get_warnings')
endfunction
+1 -1
View File
@@ -27,6 +27,6 @@ function! airline#extensions#tagbar#init(ext)
call a:ext.add_inactive_statusline_func('airline#extensions#tagbar#inactive_apply')
let g:tagbar_status_func = 'airline#extensions#tagbar#get_status'
let g:airline_parts.tagbar = 'airline#extensions#tagbar#currenttag'
call airline#parts#define_function('tagbar', 'airline#extensions#tagbar#currenttag')
endfunction
+1 -1
View File
@@ -65,7 +65,7 @@ function! airline#extensions#whitespace#toggle()
endfunction
function! airline#extensions#whitespace#init(...)
let g:airline_parts.whitespace = '%{airline#extensions#whitespace#check()}'
call airline#parts#define_function('whitespace', 'airline#extensions#whitespace#check')
unlet! b:airline_whitespace_check
augroup airline_whitespace