From 1f15d5dbc144c83d2d7e1fce4c35d98d0bc691c9 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Mon, 1 Jul 2013 19:49:40 -0400 Subject: [PATCH] update readme, help; add faq, sample symbols --- README.md | 29 +++++++++++++++++------------ doc/airline.txt | 30 ++++++++++++++++++++++++++++-- plugin/airline.vim | 22 ++++++++++++++-------- 3 files changed, 59 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 4de687e4..dd7f3296 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,35 @@ # vim-airline -lean & mean statusline for vim +lean & mean statusline for vim that's light as air # rationale -there's already [powerline](https://github.com/Lokaltog/powerline), why yet another statusline? +there's already [powerline][b], why yet another statusline? * it's standard vimscript, no python needed * it's small. i want the entire plugin to be less than 200 lines as a rule -* gets you 90% of the way there: in addition to all the standard goodies, supports [fugitve](https://github.com/tpope/vim-fugitive) and [syntastic](https://github.com/scrooloose/syntastic) +* gets you 90% of the way there: in addition to all the standard goodies, supports [fugitive](https://github.com/tpope/vim-fugitive) and [syntastic](https://github.com/scrooloose/syntastic) * integration with [vim-bufferline](https://github.com/bling/vim-bufferline) * looks good with regular fonts, with support to use powerline font glyths * it's fast to load. since it's so small, it only takes 0.5ms to load. by comparison, powerline needs 60ms on the same machine. # why's it called airline? -i wrote this on an airplane, and since it's light as air it turned out to be a good name :-) +i wrote this on an airplane, and since it's light as air it turned out to be a good name. thanks for flying vim! # configuration -there are a couple configuration values available: +`:help airline` -* `g:airline_left_sep` the seperator used on the left side -* `g:airline_right_sep` the seperator used on the right side -* `g:airline_enable_fugitive` enable/disable fugitive integration -* `g:airline_enable_syntastic` enable/disable syntastic integration -* `g:airline_theme` change the theme, currently only `default` is available -* `g:airline_powerline_fonts` enable/disable usage of patched powerline font symbols +# faq -# demo +1. the powerline font symbols are not showing up + * the older deprecated [vim-powerline][a] uses different codes compared to the newer [powerline][b]. + * you can grab prepatched fonts at [powerline-fonts][c], or you can manually set the relevant `g:` variables +2. leaving insert mode does not update the statusline + * this has been reproducible on older versions of vim, please use a newer version of vim + +# screenshots ## regular font @@ -45,3 +46,7 @@ contributions and pull requests are welcome. # license `:h license` + +[a]: https://github.com/Lokaltog/vim-powerline +[b]: https://github.com/Lokaltog/powerline +[c]: https://github.com/Lokaltog/powerline-fonts diff --git a/doc/airline.txt b/doc/airline.txt index a25d6257..2ca6dd4e 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -1,4 +1,4 @@ -*airline.txt* Lean and mean statusline +*airline.txt* Lean and mean statusline that's light as air ============================================================================== RATIONALE *airline* @@ -25,7 +25,7 @@ i wrote this on an airplane, and since it's light as air it turned out to be a good name :-) ============================================================================== -CONFIGURATION *airline-configuration* +CONFIGURATION *airline-configuration* there are a couple configuration values available (shown with their default values): @@ -60,6 +60,32 @@ values): let g:airline_powerline_fonts=0 < +============================================================================== +CUSTOMIZATION *airline-customization* + +here are some unicode symbols for customizing the left/right seperators, as +well as the powerline font glyths + +> + " unicode symbols + let g:airline_left_sep = '»' + let g:airline_left_sep = '▶' + let g:airline_right_sep = '«' + let g:airline_right_sep = '◀' + let g:airline_linecolumn_prefix = '␊ ' + let g:airline_linecolumn_prefix = '␤ ' + let g:airline_fugitive_prefix = '⎇ ' + + " powerline symbols + let g:airline_left_sep = '' + let g:airline_left_sep = '' + let g:airline_right_sep = '' + let g:airline_right_sep = '' + let g:airline_fugitive_prefix = '  ' + let g:airline_readonly_symbol = '' + let g:airline_linecolumn_prefix = ' ' +< + ============================================================================== CONTRIBUTIONS *airline-contributions* diff --git a/plugin/airline.vim b/plugin/airline.vim index ff6ff567..cc3892e9 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -1,10 +1,8 @@ -" powerline symbols:        -" some unicode symbols: ▶ » « ◀ if !exists('g:airline_left_sep') - let g:airline_left_sep=exists('g:airline_powerline_fonts')?"":">" + let g:airline_left_sep = exists('g:airline_powerline_fonts')?"":">" endif if !exists('g:airline_right_sep') - let g:airline_right_sep=exists('g:airline_powerline_fonts')?"":"<" + let g:airline_right_sep = exists('g:airline_powerline_fonts')?"":"<" endif if !exists('g:airline_enable_fugitive') let g:airline_enable_fugitive = 1 @@ -12,10 +10,18 @@ endif if !exists('g:airline_enable_syntastic') let g:airline_enable_syntastic = 1 endif -let g:airline_fugitive_prefix = exists('g:airline_powerline_fonts')?'  ':' ' -let g:airline_readonly_symbol = exists('g:airline_powerline_fonts')?'':'RO' -let g:airline_linecolumn_prefix = exists('g:airline_powerline_fonts')?' ':':' -let g:airline_theme = 'default' +if !exists('g:airline_fugitive_prefix') + let g:airline_fugitive_prefix = exists('g:airline_powerline_fonts')?'  ':' ' +endif +if !exists('g:airline_readonly_symbol') + let g:airline_readonly_symbol = exists('g:airline_powerline_fonts')?'':'RO' +endif +if !exists('g:airline_linecolumn_prefix') + let g:airline_linecolumn_prefix = exists('g:airline_powerline_fonts')?' ':':' +endif +if !exists('g:airline_theme') + let g:airline_theme = 'default' +endif set laststatus=2