Merge pull request #261 from pydave/add-ctrlp-hide-modes

Add option to hide previous/next modes in ctrlp
This commit is contained in:
Bailey Ling 2013-09-19 11:20:49 -07:00
commit 0860d2f525
2 changed files with 11 additions and 1 deletions

View File

@ -43,7 +43,12 @@ function! airline#extensions#ctrlp#ctrlp_airline(...)
let focus = '%=%<%#CtrlPdark# '.a:1.' %*'
let byfname = '%#CtrlParrow3#'.g:airline_right_alt_sep.'%#CtrlPdark# '.a:2.' %*'
let dir = '%#CtrlParrow3#'.g:airline_right_sep.'%#CtrlPlight# '.getcwd().' %*'
return regex.prv.item.nxt.marked.focus.byfname.dir
if get(g:, 'airline#extensions#ctrlp#show_adjacent_modes', 1)
let modes = prv.item.nxt
else
let modes = item
endif
return regex.modes.marked.focus.byfname.dir
endfunction
" Argument: len

View File

@ -280,6 +280,11 @@ ctrlp <https://github.com/kien/ctrlp.vim>
let g:airline#extensions#ctrlp#color_template = 'visual'
let g:airline#extensions#ctrlp#color_template = 'replace'
<
* configure whether to show the previous and next modes (mru, buffer, etc...)
>
let g:airline#extensions#ctrlp#show_adjacent_modes = 1
<
------------------------------------- *airline-virtualenv*
virtualenv <https://github.com/jmcantrell/vim-virtualenv>