add note about bufferline integration

This commit is contained in:
Bailey Ling 2013-06-30 22:27:17 +02:00
parent 59c1818720
commit a979c9bf52
2 changed files with 14 additions and 13 deletions

View File

@ -9,6 +9,7 @@ there's already [powerline](https://github.com/Lokaltog/powerline), why yet anot
* 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)
* integration with [vim-bufferline](https://github.com/bling/vim-bufferline)
* it's fast. since it's so small, it only takes 0.6ms to load. by requiring python, powerline needs 60ms on the same machine.
# why's it called airline?

View File

@ -14,18 +14,6 @@ endif
set laststatus=2
function! s:highlight(colors)
let cmd = printf('hi %s %s %s %s %s %s %s',
\ a:colors[0],
\ a:colors[1] != '' ? 'guifg='.a:colors[1] : '',
\ a:colors[2] != '' ? 'guibg='.a:colors[2] : '',
\ a:colors[3] != '' ? 'ctermfg='.a:colors[3] : '',
\ a:colors[4] != '' ? 'ctermbg='.a:colors[4] : '',
\ a:colors[5] != '' ? 'gui='.a:colors[5] : '',
\ a:colors[5] != '' ? 'term='.a:colors[5] : '')
exec cmd
endfunction
let g:airline_colors = {
\ 'mode': [ 'User2' , '#00005f' , '#dfff00' , 17 , 190 , 'bold' ] ,
\ 'mode_seperator': [ 'User3' , '#dfff00' , '#444444' , 190 , 238 , 'bold' ] ,
@ -53,6 +41,18 @@ let g:airline_colors_visual = {
\ 'statusline': [ 'StatusLine' , '#ffffff' , '#5f0000' , 15 , 52 , '' ] ,
\ }
function! s:highlight(colors)
let cmd = printf('hi %s %s %s %s %s %s %s',
\ a:colors[0],
\ a:colors[1] != '' ? 'guifg='.a:colors[1] : '',
\ a:colors[2] != '' ? 'guibg='.a:colors[2] : '',
\ a:colors[3] != '' ? 'ctermfg='.a:colors[3] : '',
\ a:colors[4] != '' ? 'ctermbg='.a:colors[4] : '',
\ a:colors[5] != '' ? 'gui='.a:colors[5] : '',
\ a:colors[5] != '' ? 'term='.a:colors[5] : '')
exec cmd
endfunction
function! AirlineModePrefix()
let l:mode = mode()
@ -65,7 +65,7 @@ function! AirlineModePrefix()
call <sid>highlight(g:airline_colors.info_seperator)
call <sid>highlight(g:airline_colors.file)
if l:mode ==# "i" || l:mode ==# 'R'
if l:mode ==# "i" || l:mode ==# "R"
call <sid>highlight(g:airline_colors_insert.statusline)
call <sid>highlight(g:airline_colors_insert.mode)
call <sid>highlight(g:airline_colors_insert.mode_seperator)