Skip to content

Commit

Permalink
Allow users to customize Ctrl-P's statusline
Browse files Browse the repository at this point in the history
This lets you disable focus, prev, next:
	let g:Powerline#Segments#ctrlp#segments#focus = ''
	let g:Powerline#Segments#ctrlp#segments#prev = ''
	let g:Powerline#Segments#ctrlp#segments#next = ''

Closes Lokaltog#185.
  • Loading branch information
pydave authored and Lokaltog committed Aug 7, 2012
1 parent 9ba65bb commit dedefae
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions autoload/Powerline/Segments/ctrlp.vim 100644 → 100755
@@ -1,9 +1,19 @@
if !exists("g:Powerline#Segments#ctrlp#segments#focus ")
let g:Powerline#Segments#ctrlp#segments#focus = '%{"%0"}'
endif
if !exists("g:Powerline#Segments#ctrlp#segments#prev ")
let g:Powerline#Segments#ctrlp#segments#prev = '%-3{"%3"}'
endif
if !exists("g:Powerline#Segments#ctrlp#segments#next ")
let g:Powerline#Segments#ctrlp#segments#next = '%-3{"%5"}'
endif

let g:Powerline#Segments#ctrlp#segments = Pl#Segment#Init(['ctrlp'
\ , Pl#Segment#Create('focus', '%{"%0"}')
\ , Pl#Segment#Create('focus', g:Powerline#Segments#ctrlp#segments#focus)
\ , Pl#Segment#Create('byfname', '%{"%1"}')
\ , Pl#Segment#Create('prev', '%-3{"%3"}')
\ , Pl#Segment#Create('prev', g:Powerline#Segments#ctrlp#segments#prev)
\ , Pl#Segment#Create('item', '%-9{"%4"}')
\ , Pl#Segment#Create('next', '%-3{"%5"}')
\ , Pl#Segment#Create('next', g:Powerline#Segments#ctrlp#segments#next)
\ , Pl#Segment#Create('marked', '%{"%6" == " <+>" ? "" : strpart("%6", 2, len("%6") - 3)}')
\
\ , Pl#Segment#Create('count', '%-6{"%0"}')
Expand Down

0 comments on commit dedefae

Please sign in to comment.