From 645c67731c56baeae35067b52f3b83ef79b33c33 Mon Sep 17 00:00:00 2001 From: maciej Date: Thu, 18 Jul 2013 07:56:29 +0200 Subject: [PATCH] Add lawrencium support --- README.md | 3 ++- autoload/airline.vim | 5 +++-- doc/airline.txt | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0eab3a82..93567ef2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ There's already [powerline][b], why yet another statusline? * it's 100% vimscript; no python needed. * it's small. i want the core plugin to be *less than 200 lines* as a rule (specifically adhering to the [open/closed principle][h]). -* despite the small size, it is fully featured and already integrates with: [vim-bufferline][f], [fugitive][d], [unite][i], [ctrlp][j], [minibufexpl][o], [gundo][p], [undotree][q], [nerdtree][r], [tagbar][s] and [syntastic][e]. +* despite the small size, it is fully featured and already integrates with: [vim-bufferline][f], [fugitive][d], [unite][i], [ctrlp][j], [minibufexpl][o], [gundo][p], [undotree][q], [nerdtree][r], [tagbar][s], [syntastic][e] and [lawrencium][u]. * it looks good with regular fonts, and provides configuration points so you can use unicode or powerline symbols. * it's fast to load, taking roughly 1ms. by comparison, powerline needs 60ms on the same machine. * it's fully customizable; if you know a little `statusline` syntax you can tweak it to your needs. @@ -98,3 +98,4 @@ Distributed under the same terms as the Vim license. See `:help license`. [r]: https://github.com/scrooloose/nerdtree [s]: https://github.com/majutsushi/tagbar [t]: https://powerline.readthedocs.org/en/latest/fontpatching.html +[u]: https://bitbucket.org/ludovicchabant/vim-lawrencium diff --git a/autoload/airline.vim b/autoload/airline.vim index 61fc95c5..6047d0f9 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -90,8 +90,9 @@ endfunction function! airline#update_externals() let g:airline_externals_bufferline = g:airline_enable_bufferline && exists('g:bufferline_loaded') ? '%{bufferline#generate_string()}' : "%f%m" let g:airline_externals_syntastic = g:airline_enable_syntastic && exists('g:loaded_syntastic_plugin') ? '%{SyntasticStatuslineFlag()}' : '' - let g:airline_externals_fugitive = g:airline_enable_fugitive && exists('g:loaded_fugitive') && strlen(fugitive#head()) > 0 - \ ? g:airline_fugitive_prefix.fugitive#head() : '' + let g:airline_externals_fugitive = g:airline_enable_fugitive ? (exists('g:loaded_fugitive') && strlen(fugitive#head()) > 0 + \ ? g:airline_fugitive_prefix.fugitive#head() : exists('g:loaded_lawrencium') && strlen(lawrencium#statusline()) > 0 + \ ? g:airline_fugitive_prefix.lawrencium#statusline() : '') : '' endfunction function! s:get_section(key) diff --git a/doc/airline.txt b/doc/airline.txt index 32fa0f84..7b96f294 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -15,6 +15,7 @@ another statusline? * vim-bufferline * unite * ctrlp + * lawrencium * it looks good with regular fonts, and provides configuration points so you can use unicode or powerline symbols. * it's fast to load, taking roughly 1ms. by comparison, powerline needs @@ -48,7 +49,7 @@ values): let g:airline_right_sep='<' < -* enable/disable fugitive integration +* enable/disable fugitive/lawrencium integration > let g:airline_enable_fugitive=1 < @@ -143,7 +144,7 @@ with the usual statusline syntax. > " here are the the default values let g:airline_section_a (the mode/paste indicator) - let g:airline_section_b (the fugitive branch indicator) + let g:airline_section_b (the fugitive/lawrencium branch indicator) let g:airline_section_c (bufferline or filename) let g:airline_section_gutter (syntastic and readonly flag) let g:airline_section_x (filetype)