improve documentation for writing extensions, also add helper methods.

This commit is contained in:
Bailey Ling
2013-08-25 15:39:11 +00:00
parent 9ca2aa9a8c
commit a91dda01df
5 changed files with 49 additions and 37 deletions

View File

@@ -54,10 +54,7 @@ function! airline#extensions#whitespace#check()
endfunction!
function! airline#extensions#whitespace#apply(...)
if !exists('w:airline_section_warning')
let w:airline_section_warning = ' '
endif
let w:airline_section_warning .= '%{airline#extensions#whitespace#check()}'
call airline#extensions#append_to_section('warning', ' %{airline#extensions#whitespace#check()}')
endfunction
function! airline#extensions#whitespace#toggle()