diff --git a/README.md b/README.md index b39209b..d89ac0c 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,7 @@ Lean & mean statusline for vim that's light as air. * Extensive suite of themes for popular colorschemes including [solarized][23] (dark and light), [tomorrow][24] (all variants), [base16][32] (all variants), [molokai][25], [jellybeans][26] and others; have a look at the [screenshots][14] in the wiki. * Supports 7.2 as the minimum Vim version. * Stable release cycle; bleeding edge changes happen on the `dev` branch, and after they have gone through a [full regression test][33] will eventually be merged in the stable master branch. Releases typically occur every 2 weeks. - -[![Build Status](https://travis-ci.org/bling/vim-airline.png)](https://travis-ci.org/bling/vim-airline) +* Unit tests: [![Build Status](https://travis-ci.org/bling/vim-airline.png)](https://travis-ci.org/bling/vim-airline) ## Straightforward customization diff --git a/autoload/airline/extensions/example.vim b/autoload/airline/extensions/example.vim index 0f571f2..735fbe9 100644 --- a/autoload/airline/extensions/example.vim +++ b/autoload/airline/extensions/example.vim @@ -25,10 +25,14 @@ endfunction function! airline#extensions#example#apply(...) " First we check for the filetype. if &filetype == "nyancat" - " 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', airline#parts#get('cats').raw) + + " Let's say we want to append to section_c, first we check if there's + " already a window-local override, and if not, create it off of the global + " section_c. + let w:airline_section_c = get(w:, 'airline_section_c', g:airline_section_c) + + " Then we just append this extenion to it, optionally using separators. + let w:airline_section_c .= ' '.g:airline_left_alt_sep.' %{airline#extensions#example#get_cats()}' endif endfunction