# HG changeset patch # User Steve Losh # Date 1326817299 18000 # Node ID 4a5142cfb33c95e51397943b744536eea3c8f07b # Parent 7df6b989f544202e58faf5276fb2923563fb1a72 Custom powerline theme. diff -r 7df6b989f544 -r 4a5142cfb33c vim/.vimrc --- a/vim/.vimrc Mon Jan 16 13:57:22 2012 -0500 +++ b/vim/.vimrc Tue Jan 17 11:21:39 2012 -0500 @@ -918,16 +918,16 @@ let g:EasyMotion_do_mapping = 0 -nnoremap f :call EasyMotionF(0, 0) -onoremap f :call EasyMotionF(0, 0) -vnoremap f :call EasyMotionF(1, 0) +nnoremap f :call EasyMotion#F(0, 0) +onoremap f :call EasyMotion#F(0, 0) +vnoremap f :call EasyMotion#F(1, 0) -nnoremap F :call EasyMotionF(0, 1) -onoremap F :call EasyMotionF(0, 1) -vnoremap F :call EasyMotionF(1, 1) +nnoremap F :call EasyMotion#F(0, 1) +onoremap F :call EasyMotion#F(0, 1) +vnoremap F :call EasyMotion#F(1, 1) -onoremap t :call EasyMotionT(0, 0) -onoremap T :call EasyMotionT(0, 1) +onoremap t :call EasyMotion#T(0, 0) +onoremap T :call EasyMotion#T(0, 1) " }}} " Fugitive {{{ @@ -1018,6 +1018,7 @@ " Powerline {{{ let g:Powerline_symbols = 'fancy' +let g:Powerline_theme = 'sjl' " }}} " Python-Mode {{{ @@ -1528,3 +1529,9 @@ command! NyanMe call NyanMe() " }}} +" Dtach ------------------------------------------------------------------- {{{ + +vnoremap e :silent '<,'>w !dtach -s /tmp/target:silent !echo \| dtach -s /tmp/target +nnoremap e ^vg_:silent '<,'>w !dtach -s /tmp/target + +" }}} diff -r 7df6b989f544 -r 4a5142cfb33c vim/bundle/powerline-theme/powerline/sjl.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/powerline-theme/powerline/sjl.vim Tue Jan 17 11:21:39 2012 -0500 @@ -0,0 +1,53 @@ +function! Stl_GetMode() " {{{ + let ret = mode() + + let ret = substitute(ret, '', '^V', 'g') + + return ret +endfunction " }}} +function! Stl_GetBranch(branch_symbol) " {{{ + let ret = fugitive#statusline() + + let ret = substitute(ret, 'GIT(\([a-z0-9\-_\./:]\+\))', ' '. a:branch_symbol .' \1 ', 'gi') + + return ret +endfunction " }}} +function! Stl_GetSyntaxErrors(line_symbol) " {{{ + if ! exists('g:syntastic_stl_format') + " Syntastic hasn't been loaded yet + return '' + endif + + " Temporarily change syntastic output format + let old_stl_format = g:syntastic_stl_format + let g:syntastic_stl_format = '╱╱╱%E{ ERRORS (%e) '. a:line_symbol .' %fe }%W{ WARNINGS (%w) '. a:line_symbol .' %fw }╱╱╱' + + let ret = SyntasticStatuslineFlag() + + let g:syntastic_stl_format = old_stl_format + + return ret +endfunction " }}} +function! Stl_GetCurrentFunction() " {{{ + return cfi#format(' %s', '') +endfunction " }}} +function! Stl_GetCommandTLine() " {{{ + let line = getline('.') + + " Trim whitespace from current line + let line = substitute(line, '\v^\>\s+|\s+$', '', 'g') + + return line +endfunction " }}} +function! Stl_GetManPage() " {{{ + let matches = matchlist(getline(1), '\v^([a-zA-Z_\.\-]+)\((\d+)\)') + + if ! len(matches) + return 'n/a' + endif + + let file = tolower(matches[1]) + let num = matches[2] + + return file +endfunction " }}} diff -r 7df6b989f544 -r 4a5142cfb33c vim/bundle/powerline-theme/powerline/sjl/00-default.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/powerline-theme/powerline/sjl/00-default.vim Tue Jan 17 11:21:39 2012 -0500 @@ -0,0 +1,93 @@ +call Pl#Statusline( + \ Pl#Segment(" %-2{Stl_GetMode()} ", + \ Pl#HiCurrent( Pl#FG( 22), Pl#BG(148), Pl#Attr('bold')), + \ Pl#HiInsert( Pl#FG( 23), Pl#BG(231), Pl#Attr('bold')) + \ ), + \ + \ Pl#Segment("%{Stl_GetBranch('$branch')}", + \ exists('g:loaded_fugitive') && g:loaded_fugitive == 1, + \ + \ Pl#HiCurrent( Pl#FG(250), Pl#BG(240)), + \ Pl#HiInsert( Pl#FG(117), Pl#BG( 31)), + \ Pl#HiNonCurrent(Pl#FG(239), Pl#BG(235)) + \ ), + \ + \ Pl#SegmentGroup( + \ Pl#HiCurrent( Pl#BG(240)), + \ Pl#HiInsert( Pl#BG( 31)), + \ Pl#HiNonCurrent(Pl#BG(235)), + \ + \ Pl#Segment("%{&readonly ? ' $ro' : ''}", + \ Pl#HiCurrent( Pl#FG(196)), + \ Pl#HiInsert( Pl#FG(196)), + \ Pl#HiNonCurrent(Pl#FG( 88)) + \ ), + \ Pl#Segment(" %f ", + \ Pl#HiCurrent( Pl#FG(231), Pl#Attr('bold')), + \ Pl#HiInsert( Pl#FG(231), Pl#Attr('bold')), + \ Pl#HiNonCurrent(Pl#FG(245), Pl#Attr('bold')) + \ ), + \ Pl#Segment("%M ", + \ Pl#HiCurrent( Pl#FG(196), Pl#Attr('bold')), + \ Pl#HiInsert( Pl#FG(196), Pl#Attr('bold')), + \ Pl#HiNonCurrent(Pl#FG( 88)) + \ ), + \ Pl#Segment("%H%W ", + \ Pl#HiCurrent( Pl#FG(250)), + \ Pl#HiInsert( Pl#FG(117)), + \ Pl#HiNonCurrent(Pl#FG(239)) + \ ), + \ Pl#Segment("%{Stl_GetSyntaxErrors('$line')}", + \ exists('g:loaded_syntastic_plugin') && g:loaded_syntastic_plugin == 1, + \ + \ Pl#HiCurrent( Pl#FG(214), Pl#Attr('bold')), + \ Pl#HiInsert( Pl#FG(214), Pl#Attr('bold')), + \ ) + \ ), + \ + \ Pl#Segment("%<%{Stl_GetCurrentFunction()}", + \ exists('g:cfi_disable') && g:cfi_disable == 0, + \ + \ Pl#HiCurrent( Pl#FG(247), Pl#BG(236)), + \ Pl#HiInsert( Pl#FG(117), Pl#BG( 24)) + \ ), + \ + \ Pl#Split( + \ Pl#HiCurrent( Pl#BG(236)), + \ Pl#HiInsert( Pl#BG( 24)), + \ Pl#HiNonCurrent(Pl#BG(233)) + \ ), + \ + \ Pl#Segment("%{&fileformat} %{(&fenc == '' ? &enc : &fenc)} ", + \ Pl#HiCurrent( Pl#FG(246), Pl#BG(236)), + \ Pl#HiInsert( Pl#FG( 75), Pl#BG( 24)) + \ ), + \ + \ Pl#Segment(" $ft %{strlen(&ft) ? &ft : 'n/a'} ", + \ Pl#HiCurrent( Pl#FG(246), Pl#BG(236)), + \ Pl#HiInsert( Pl#FG( 75), Pl#BG( 24)), + \ ), + \ + \ Pl#Segment(" %3p%% ", + \ Pl#HiCurrent( Pl#FG(250), Pl#BG(240)), + \ Pl#HiInsert( Pl#FG(117), Pl#BG( 31)), + \ Pl#HiNonCurrent(Pl#FG(241), Pl#BG(234)) + \ ), + \ + \ Pl#SegmentGroup( + \ Pl#HiCurrent( Pl#BG(252)), + \ Pl#HiInsert( Pl#BG(117)), + \ Pl#HiNonCurrent(Pl#BG(235)), + \ + \ Pl#Segment(" $line %3l", + \ Pl#HiCurrent( Pl#FG(236), Pl#Attr('bold')), + \ Pl#HiInsert( Pl#FG( 23), Pl#Attr('bold')), + \ Pl#HiNonCurrent(Pl#FG(245)) + \ ), + \ Pl#Segment(":%-2c ", + \ Pl#HiCurrent( Pl#FG(244)), + \ Pl#HiInsert( Pl#FG( 23)), + \ Pl#HiNonCurrent(Pl#FG(241)) + \ ) + \ ) + \ ) diff -r 7df6b989f544 -r 4a5142cfb33c vim/bundle/powerline-theme/powerline/sjl/50-command-t.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/powerline-theme/powerline/sjl/50-command-t.vim Tue Jan 17 11:21:39 2012 -0500 @@ -0,0 +1,27 @@ +call Pl#Statusline( + \ Pl#Match('bufname("%")', 'GoToFile'), + \ + \ Pl#Segment(' %{"Command-T"} ', + \ Pl#HiCurrent( Pl#FG(231), Pl#BG(124), Pl#Attr('bold')), + \ Pl#HiInsert( Pl#FG(231), Pl#BG( 31), Pl#Attr('bold')), + \ Pl#HiNonCurrent(Pl#FG(244), Pl#BG( 52), Pl#Attr('bold')) + \ ), + \ + \ Pl#Segment(' %<%{Stl_GetCommandTLine()}', + \ Pl#HiCurrent( Pl#FG(231), Pl#BG( 88)), + \ Pl#HiInsert( Pl#FG(117), Pl#BG( 24)), + \ Pl#HiNonCurrent(Pl#FG(244), Pl#BG( 52)) + \ ), + \ + \ Pl#Split( + \ Pl#HiCurrent( Pl#BG( 88)), + \ Pl#HiInsert( Pl#BG( 24)), + \ Pl#HiNonCurrent(Pl#BG( 52)) + \ ), + \ + \ Pl#Segment(" %10(Match #%l%) ", + \ Pl#HiCurrent( Pl#FG(231), Pl#BG(124)), + \ Pl#HiInsert( Pl#FG(117), Pl#BG( 31)), + \ Pl#HiNonCurrent(Pl#FG(244), Pl#BG( 52)) + \ ) + \ ) diff -r 7df6b989f544 -r 4a5142cfb33c vim/bundle/powerline-theme/powerline/sjl/50-gundo.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/powerline-theme/powerline/sjl/50-gundo.vim Tue Jan 17 11:21:39 2012 -0500 @@ -0,0 +1,43 @@ +call Pl#Statusline( + \ Pl#Match('bufname("%")', '__Gundo__'), + \ + \ Pl#Segment(' %{"Gundo"} ', + \ Pl#HiCurrent( Pl#FG(231), Pl#BG(124), Pl#Attr('bold')), + \ Pl#HiInsert( Pl#FG(231), Pl#BG( 31), Pl#Attr('bold')), + \ Pl#HiNonCurrent(Pl#FG(244), Pl#BG( 52), Pl#Attr('bold')) + \ ), + \ + \ Pl#Segment('%< %{"Undo tree"}', + \ Pl#HiCurrent( Pl#FG(231), Pl#BG( 88)), + \ Pl#HiInsert( Pl#FG(117), Pl#BG( 24)), + \ Pl#HiNonCurrent(Pl#FG(244), Pl#BG( 52)) + \ ), + \ + \ Pl#Split( + \ Pl#HiCurrent( Pl#BG( 88)), + \ Pl#HiInsert( Pl#BG( 24)), + \ Pl#HiNonCurrent(Pl#BG( 52)) + \ ) + \ ) + +call Pl#Statusline( + \ Pl#Match('bufname("%")', '__Gundo_Preview__'), + \ + \ Pl#Segment(' %{"Gundo"} ', + \ Pl#HiCurrent( Pl#FG(231), Pl#BG(124), Pl#Attr('bold')), + \ Pl#HiInsert( Pl#FG(231), Pl#BG( 31), Pl#Attr('bold')), + \ Pl#HiNonCurrent(Pl#FG(244), Pl#BG( 52), Pl#Attr('bold')) + \ ), + \ + \ Pl#Segment('%< %{"Diff preview"}', + \ Pl#HiCurrent( Pl#FG(231), Pl#BG( 88)), + \ Pl#HiInsert( Pl#FG(117), Pl#BG( 24)), + \ Pl#HiNonCurrent(Pl#FG(244), Pl#BG( 52)) + \ ), + \ + \ Pl#Split( + \ Pl#HiCurrent( Pl#BG( 88)), + \ Pl#HiInsert( Pl#BG( 24)), + \ Pl#HiNonCurrent(Pl#BG( 52)) + \ ) + \ ) diff -r 7df6b989f544 -r 4a5142cfb33c vim/bundle/powerline-theme/powerline/sjl/50-help.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/powerline-theme/powerline/sjl/50-help.vim Tue Jan 17 11:21:39 2012 -0500 @@ -0,0 +1,27 @@ +call Pl#Statusline( + \ Pl#Match('&ft', 'help'), + \ + \ Pl#Segment(' %{"Help"} ', + \ 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('%< %t', + \ 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)) + \ ), + \ + \ Pl#Segment(" %3p%% ", + \ Pl#HiCurrent( Pl#FG(250), Pl#BG(240)), + \ Pl#HiInsert( Pl#FG(117), Pl#BG( 31)), + \ Pl#HiNonCurrent(Pl#FG(244), Pl#BG(234)) + \ ) + \ ) diff -r 7df6b989f544 -r 4a5142cfb33c vim/bundle/powerline-theme/powerline/sjl/50-lusty.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/powerline-theme/powerline/sjl/50-lusty.vim Tue Jan 17 11:21:39 2012 -0500 @@ -0,0 +1,21 @@ +call Pl#Statusline( + \ Pl#Match('bufname("%")', '\[LustyExplorer-Buffers\]'), + \ + \ Pl#Segment(' %{"LustyExplorer"} ', + \ 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('%< %{"Buffer 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)) + \ ) + \ ) diff -r 7df6b989f544 -r 4a5142cfb33c vim/bundle/powerline-theme/powerline/sjl/50-manpage.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/powerline-theme/powerline/sjl/50-manpage.vim Tue Jan 17 11:21:39 2012 -0500 @@ -0,0 +1,27 @@ +call Pl#Statusline( + \ Pl#Match('&ft', 'man'), + \ + \ Pl#Segment(' %{"Man page"} ', + \ Pl#HiCurrent( Pl#FG(247), Pl#BG(240), Pl#Attr('bold')), + \ Pl#HiInsert( Pl#FG(117), Pl#BG( 31), Pl#Attr('bold')), + \ Pl#HiNonCurrent(Pl#FG(244), Pl#BG(234), Pl#Attr('bold')) + \ ), + \ + \ Pl#Segment(' %{Stl_GetManPage()} %<', + \ 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#Split( + \ Pl#HiCurrent( Pl#BG(236)), + \ Pl#HiInsert( Pl#BG( 24)), + \ Pl#HiNonCurrent(Pl#BG(234)) + \ ), + \ + \ Pl#Segment(" %p%% ", + \ Pl#HiCurrent( Pl#FG(250), Pl#BG(240)), + \ Pl#HiInsert( Pl#FG(117), Pl#BG( 31)), + \ Pl#HiNonCurrent(Pl#FG(244), Pl#BG(234)) + \ ) + \ ) diff -r 7df6b989f544 -r 4a5142cfb33c vim/bundle/powerline-theme/powerline/sjl/50-syntastic.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/powerline-theme/powerline/sjl/50-syntastic.vim Tue Jan 17 11:21:39 2012 -0500 @@ -0,0 +1,21 @@ +call Pl#Statusline( + \ Pl#Match('&ft', 'qf'), + \ + \ Pl#Segment(' %{"Quickfix"} ', + \ 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('%< %{"Location 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)) + \ ) + \ ) diff -r 7df6b989f544 -r 4a5142cfb33c vim/bundle/powerline-theme/powerline/sjl/50-tagbar.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/powerline-theme/powerline/sjl/50-tagbar.vim Tue Jan 17 11:21:39 2012 -0500 @@ -0,0 +1,21 @@ +call Pl#Statusline( + \ Pl#Match('bufname("%")', '__Tagbar__'), + \ + \ Pl#Segment(' %{"Tagbar"} ', + \ Pl#HiCurrent( Pl#FG(231), Pl#BG( 70), Pl#Attr('bold')), + \ Pl#HiInsert( Pl#FG(231), Pl#BG( 31), Pl#Attr('bold')), + \ Pl#HiNonCurrent(Pl#FG( 70), Pl#BG( 22), Pl#Attr('bold')) + \ ), + \ + \ Pl#Segment('%< %{"Tree"}', + \ Pl#HiCurrent( Pl#FG(148), Pl#BG( 28)), + \ Pl#HiInsert( Pl#FG(117), Pl#BG( 24)), + \ Pl#HiNonCurrent(Pl#FG( 70), Pl#BG( 22)) + \ ), + \ + \ Pl#Split( + \ Pl#HiCurrent( Pl#BG( 28)), + \ Pl#HiInsert( Pl#BG( 24)), + \ Pl#HiNonCurrent(Pl#BG( 22)) + \ ) + \ )