diff --git a/README.md b/README.md index 6527383..d9f9a96 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Lean & mean status/tabline for vim that's light as air. # Features * Tiny core written with extensibility in mind ([open/closed principle][8]). -* Integrates with a variety of plugins, including: [vim-bufferline][6], [fugitive][4], [unite][9], [ctrlp][10], [minibufexpl][15], [gundo][16], [undotree][17], [nerdtree][18], [tagbar][19], [vim-gitgutter][29], [vim-signify][30], [syntastic][5], [eclim][34], [lawrencium][21], [virtualenv][31], [tmuxline][35], and more. +* Integrates with a variety of plugins, including: [vim-bufferline][6], [fugitive][4], [unite][9], [ctrlp][10], [minibufexpl][15], [gundo][16], [undotree][17], [nerdtree][18], [tagbar][19], [vim-gitgutter][29], [vim-signify][30], [syntastic][5], [eclim][34], [lawrencium][21], [virtualenv][31], [tmuxline][35], [taboo.vim][37], [ctrlspace][38] and more. * Looks good with regular fonts and provides configuration points so you can use unicode or powerline symbols. * Optimized for speed; it loads in under a millisecond. * Extensive suite of themes for popular color schemes 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. @@ -219,3 +219,5 @@ MIT License. Copyright (c) 2013-2015 Bailey Ling. [34]: http://eclim.org [35]: https://github.com/edkolev/tmuxline.vim [36]: https://github.com/edkolev/promptline.vim +[37]: https://github.com/gcmt/taboo.vim +[38]: https://github.com/szw/vim-ctrlspace diff --git a/autoload/airline/extensions.vim b/autoload/airline/extensions.vim index 4f6848f..18bbf9e 100644 --- a/autoload/airline/extensions.vim +++ b/autoload/airline/extensions.vim @@ -139,6 +139,10 @@ function! airline#extensions#load() call airline#extensions#ctrlp#init(s:ext) endif + if get(g:, 'ctrlspace_loaded', 0) + call airline#extensions#ctrlspace#init(s:ext) + endif + if get(g:, 'command_t_loaded', 0) call airline#extensions#commandt#init(s:ext) endif diff --git a/autoload/airline/extensions/ctrlspace.vim b/autoload/airline/extensions/ctrlspace.vim new file mode 100644 index 0000000..3a29efd --- /dev/null +++ b/autoload/airline/extensions/ctrlspace.vim @@ -0,0 +1,18 @@ +" MIT License. Copyright (c) 2013-2015 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +let s:spc = g:airline_symbols.space +let s:padding = s:spc . s:spc . s:spc + +function! airline#extensions#ctrlspace#statusline(...) + let b = airline#builder#new({ 'active': 1 }) + call b.add_section('airline_a', s:padding . g:ctrlspace_symbols.cs . s:padding) + call b.add_section('airline_b', s:padding . ctrlspace#statusline_mode_segment(s:padding)) + call b.split() + call b.add_section('airline_x', s:spc . ctrlspace#statusline_tab_segment() . s:spc) + return b.build() +endfunction + +function! airline#extensions#ctrlspace#init(ext) + let g:ctrlspace_statusline_function = 'airline#extensions#ctrlspace#statusline()' +endfunction diff --git a/doc/airline.txt b/doc/airline.txt index 9cc2967..2a8886f 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -565,6 +565,12 @@ taboo.vim * enable/disable taboo.vim integration > let g:airline#extensions#taboo#enabled = 1 < +------------------------------------- *airline-ctrlspace* +vim-ctrlspace + +* enable/disable vim-ctrlspace integration > + let g:airline#extensions#ctrlspace#enabled = 1 +< ============================================================================== ADVANCED CUSTOMIZATION *airline-advanced-customization*