Skip to content

Instantly share code, notes, and snippets.

@Phize
Created January 14, 2012 07:48
Show Gist options
  • Save Phize/1610650 to your computer and use it in GitHub Desktop.
Save Phize/1610650 to your computer and use it in GitHub Desktop.
Vim statusline for Unite.vim with vim-powerline.
call Pl#Statusline(
\ Pl#Match('bufname("%")', '^\*unite\* - .*\@\d+$'),
\
\ Pl#Segment(' %{"Unite"} ',
\ Pl#HiCurrent( Pl#FG(231), Pl#BG(240), Pl#Attr('bold')),
\ Pl#HiInsert( Pl#FG(231), Pl#BG( 31), Pl#Attr('bold')),
\ Pl#HiNonCurrent(Pl#FG(244), Pl#BG(234), Pl#Attr('bold'))
\ ),
\
\ Pl#Segment('%< %{substitute(bufname("%"), "\^\\v\\*unite\\* - \(\.\+\)\\@\\d\+\$", "\\u\\1", "")} list',
\ Pl#HiCurrent( Pl#FG(247), Pl#BG(236)),
\ Pl#HiInsert( Pl#FG(117), Pl#BG( 24)),
\ Pl#HiNonCurrent(Pl#FG(244), Pl#BG(234))
\ ),
\
\ Pl#Split(
\ Pl#HiCurrent( Pl#BG(236)),
\ Pl#HiInsert( Pl#BG( 24)),
\ Pl#HiNonCurrent(Pl#BG(234))
\ )
\ )
call Pl#Statusline(
\ Pl#Match('bufname("%")', '^\*unite\* - default\@\d+$'),
\
\ Pl#Segment(' %{"Unite"} ',
\ Pl#HiCurrent( Pl#FG(231), Pl#BG(240), Pl#Attr('bold')),
\ Pl#HiInsert( Pl#FG(231), Pl#BG( 31), Pl#Attr('bold')),
\ Pl#HiNonCurrent(Pl#FG(244), Pl#BG(234), Pl#Attr('bold'))
\ ),
\
\ Pl#Segment('%< %{"List"}',
\ Pl#HiCurrent( Pl#FG(247), Pl#BG(236)),
\ Pl#HiInsert( Pl#FG(117), Pl#BG( 24)),
\ Pl#HiNonCurrent(Pl#FG(244), Pl#BG(234))
\ ),
\
\ Pl#Split(
\ Pl#HiCurrent( Pl#BG(236)),
\ Pl#HiInsert( Pl#BG( 24)),
\ Pl#HiNonCurrent(Pl#BG(234))
\ )
\ )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment