1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 17:45:00 +08:00

lets try again...

This commit is contained in:
amix
2012-08-16 23:41:25 -04:00
parent 85888ddbd3
commit bb9c85e523
306 changed files with 47995 additions and 21 deletions

View File

@ -0,0 +1,166 @@
call Pl#Hi#Allocate({
\ 'black' : 16,
\ 'white' : 231,
\
\ 'darkestgreen' : 22,
\ 'darkgreen' : 28,
\ 'mediumgreen' : 70,
\ 'brightgreen' : 148,
\
\ 'darkestcyan' : 23,
\ 'mediumcyan' : 117,
\
\ 'darkestblue' : 24,
\ 'darkblue' : 31,
\
\ 'darkestred' : 52,
\ 'darkred' : 88,
\ 'mediumred' : 124,
\ 'brightred' : 160,
\ 'brightestred' : 196,
\
\ 'darkestpurple' : 55,
\ 'mediumpurple' : 98,
\ 'brightpurple' : 189,
\
\ 'brightorange' : 208,
\ 'brightestorange': 214,
\
\ 'gray0' : 233,
\ 'gray1' : 235,
\ 'gray2' : 236,
\ 'gray3' : 239,
\ 'gray4' : 240,
\ 'gray5' : 241,
\ 'gray6' : 244,
\ 'gray7' : 245,
\ 'gray8' : 247,
\ 'gray9' : 250,
\ 'gray10' : 252,
\ })
let g:Powerline#Colorschemes#default#colorscheme = Pl#Colorscheme#Init([
\ Pl#Hi#Segments(['SPLIT'], {
\ 'n': ['white', 'gray2'],
\ 'N': ['white', 'gray0'],
\ 'i': ['white', 'darkestblue'],
\ }),
\
\ Pl#Hi#Segments(['mode_indicator'], {
\ 'n': ['darkestgreen', 'brightgreen', ['bold']],
\ 'i': ['darkestcyan', 'white', ['bold']],
\ 'v': ['darkred', 'brightorange', ['bold']],
\ 'r': ['white', 'brightred', ['bold']],
\ 's': ['white', 'gray5', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['branch', 'scrollpercent', 'raw', 'filesize'], {
\ 'n': ['gray9', 'gray4'],
\ 'N': ['gray4', 'gray1'],
\ 'i': ['mediumcyan', 'darkblue'],
\ }),
\
\ Pl#Hi#Segments(['fileinfo', 'filename'], {
\ 'n': ['white', 'gray4', ['bold']],
\ 'N': ['gray7', 'gray0', ['bold']],
\ 'i': ['white', 'darkblue', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['fileinfo.filepath'], {
\ 'n': ['gray10'],
\ 'N': ['gray5'],
\ 'i': ['mediumcyan'],
\ }),
\
\ Pl#Hi#Segments(['static_str'], {
\ 'n': ['white', 'gray4'],
\ 'N': ['gray7', 'gray1'],
\ 'i': ['white', 'darkblue'],
\ }),
\
\ Pl#Hi#Segments(['fileinfo.flags'], {
\ 'n': ['brightestred', ['bold']],
\ 'N': ['darkred'],
\ 'i': ['brightestred', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['currenttag', 'fullcurrenttag', 'fileformat', 'fileencoding', 'pwd', 'filetype', 'rvm:string', 'rvm:statusline', 'virtualenv:statusline', 'charcode', 'currhigroup'], {
\ 'n': ['gray8', 'gray2'],
\ 'i': ['mediumcyan', 'darkestblue'],
\ }),
\
\ Pl#Hi#Segments(['lineinfo'], {
\ 'n': ['gray2', 'gray10', ['bold']],
\ 'N': ['gray7', 'gray1', ['bold']],
\ 'i': ['darkestcyan', 'mediumcyan', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['errors'], {
\ 'n': ['brightestorange', 'gray2', ['bold']],
\ 'i': ['brightestorange', 'darkestblue', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['lineinfo.line.tot'], {
\ 'n': ['gray6'],
\ 'N': ['gray5'],
\ 'i': ['darkestcyan'],
\ }),
\
\ Pl#Hi#Segments(['paste_indicator', 'ws_marker'], {
\ 'n': ['white', 'brightred', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['gundo:static_str.name', 'command_t:static_str.name'], {
\ 'n': ['white', 'mediumred', ['bold']],
\ 'N': ['brightred', 'darkestred', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['gundo:static_str.buffer', 'command_t:raw.line'], {
\ 'n': ['white', 'darkred'],
\ 'N': ['brightred', 'darkestred'],
\ }),
\
\ Pl#Hi#Segments(['gundo:SPLIT', 'command_t:SPLIT'], {
\ 'n': ['white', 'darkred'],
\ 'N': ['white', 'darkestred'],
\ }),
\
\ Pl#Hi#Segments(['lustyexplorer:static_str.name', 'minibufexplorer:static_str.name', 'nerdtree:raw.name', 'tagbar:static_str.name'], {
\ 'n': ['white', 'mediumgreen', ['bold']],
\ 'N': ['mediumgreen', 'darkestgreen', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['lustyexplorer:static_str.buffer', 'tagbar:static_str.buffer'], {
\ 'n': ['brightgreen', 'darkgreen'],
\ 'N': ['mediumgreen', 'darkestgreen'],
\ }),
\
\ Pl#Hi#Segments(['lustyexplorer:SPLIT', 'minibufexplorer:SPLIT', 'nerdtree:SPLIT', 'tagbar:SPLIT'], {
\ 'n': ['white', 'darkgreen'],
\ 'N': ['white', 'darkestgreen'],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:focus', 'ctrlp:byfname'], {
\ 'n': ['brightpurple', 'darkestpurple'],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:prev', 'ctrlp:next', 'ctrlp:pwd'], {
\ 'n': ['white', 'mediumpurple'],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:item'], {
\ 'n': ['darkestpurple', 'white', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:marked'], {
\ 'n': ['brightestred', 'darkestpurple', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:count'], {
\ 'n': ['darkestpurple', 'white'],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:SPLIT'], {
\ 'n': ['white', 'darkestpurple'],
\ }),
\ ])

View File

@ -0,0 +1,192 @@
" This theme is based on Solarized-dark colors, combined
" with Powerline native colors
call Pl#Hi#Allocate({
\ 'black' : 16,
\ 'white' : 231,
\
\ 'darkestgreen' : 22,
\ 'darkgreen' : 28,
\ 'mediumgreen' : 70,
\ 'brightgreen' : 148,
\
\ 'darkestcyan' : 23,
\ 'mediumcyan' : 117,
\
\ 'darkestblue' : 24,
\ 'darkblue' : 31,
\
\ 'darkestred' : 52,
\ 'darkred' : 88,
\ 'mediumred' : 124,
\ 'brightred' : 160,
\ 'brightestred' : 196,
\
\ 'darkestpurple' : 55,
\ 'mediumpurple' : 98,
\ 'brightpurple' : 189,
\
\ 'brightorange' : 208,
\ 'brightestorange': 214,
\
\ 'gray0' : 233,
\ 'gray1' : 235,
\ 'gray2' : 236,
\ 'gray3' : 239,
\ 'gray4' : 240,
\ 'gray5' : 241,
\ 'gray6' : 244,
\ 'gray7' : 245,
\ 'gray8' : 247,
\ 'gray9' : 250,
\ 'gray10' : 252,
\
\ 'base00' : [241, 0x657b83],
\ 'base01' : [240, 0x586e75],
\ 'base02' : [0, 0x073642],
\ 'base03' : [234, 0x002b36],
\ 'base0' : [244, 0x839496],
\ 'base1' : [245, 0x93a1a1],
\ 'base2' : [254, 0xeee8d5],
\ 'base3' : [230, 0xfdf6e3],
\ 'yellow' : [136, 0xb58900],
\ 'orange' : [166, 0xcb4b16],
\ 'red' : [160, 0xdc322f],
\ 'magenta' : [125, 0xd33682],
\ 'violet' : [61, 0x6c71c4],
\ 'blue' : [33, 0x268bd2],
\ 'cyan' : [37, 0x2aa198],
\ 'green' : [64, 0x859900],
\ })
let g:Powerline#Colorschemes#skwp#colorscheme = Pl#Colorscheme#Init([
\ Pl#Hi#Segments(['SPLIT'], {
\ 'n': ['white', 'base02'],
\ 'N': ['white', 'base02'],
\ }),
\
\ Pl#Hi#Segments(['mode_indicator'], {
\ 'n': ['darkestgreen', 'brightgreen', ['bold']],
\ 'i': ['darkestcyan', 'white', ['bold']],
\ 'v': ['red', 'brightorange', ['bold']],
\ 'r': ['white', 'violet', ['bold']],
\ 's': ['white', 'gray5', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['branch', 'raw', 'filesize'], {
\ 'n': ['base03', 'blue'],
\ 'N': ['gray5', 'base03'],
\ }),
\
\ Pl#Hi#Segments(['scrollpercent'], {
\ 'n': ['gray7', 'gray2'],
\ 'N': ['base2', 'base02'],
\ }),
\
\ Pl#Hi#Segments(['fileinfo', 'filename', 'filepath'], {
\ 'n': ['base2', 'darkestblue', ['bold']],
\ 'N': ['base1', 'base02', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['fileinfo.filepath'], {
\ 'n': ['gray10'],
\ 'N': ['gray5'],
\ 'i': ['mediumcyan'],
\ }),
\
\ Pl#Hi#Segments(['static_str'], {
\ 'n': ['base3', 'violet'],
\ 'N': ['base1', 'base02'],
\ 'i': ['white', 'base02'],
\ }),
\
\ Pl#Hi#Segments(['fileinfo.flags'], {
\ 'n': ['base03', ['bold']],
\ 'N': ['gray5'],
\ 'i': ['base03', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['currenttag', 'fullcurrenttag', 'fileformat', 'fileencoding', 'pwd', 'filetype', 'rvm:string', 'rvm:statusline', 'virtualenv:statusline', 'charcode', 'currhigroup'], {
\ 'n': ['gray5', 'gray2'],
\ 'i': ['mediumcyan', 'base02'],
\ }),
\
\ Pl#Hi#Segments(['lineinfo'], {
\ 'n': ['gray2', 'gray10', ['bold']],
\ 'N': ['gray7', 'gray1', ['bold']],
\ 'i': ['darkestcyan', 'mediumcyan', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['errors'], {
\ 'n': ['orange', 'base02', ['bold']],
\ 'N': ['gray5', 'base03', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['lineinfo.line.tot'], {
\ 'n': ['gray6'],
\ 'N': ['gray5'],
\ 'i': ['darkestcyan'],
\ }),
\
\ Pl#Hi#Segments(['paste_indicator', 'ws_marker'], {
\ 'n': ['base3', 'red', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['gundo:static_str.name', 'command_t:static_str.name'], {
\ 'n': ['base3', 'darkblue', ['bold']],
\ 'N': ['base1', 'base03', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['gundo:static_str.buffer', 'command_t:raw.line'], {
\ 'n': ['white', 'base02'],
\ 'N': ['gray5', 'base02'],
\ }),
\
\ Pl#Hi#Segments(['gundo:SPLIT', 'command_t:SPLIT'], {
\ 'n': ['white', 'base02'],
\ 'N': ['white', 'base02'],
\ }),
\
\ Pl#Hi#Segments(['lustyexplorer:static_str.name', 'minibufexplorer:static_str.name', 'nerdtree:raw.name', 'tagbar:static_str.name'], {
\ 'n': ['gray10', 'darkestblue', ['bold']],
\ 'N': ['gray3', 'base02', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['lustyexplorer:static_str.buffer', 'tagbar:static_str.buffer'], {
\ 'n': ['base3', 'blue'],
\ 'N': ['gray5', 'base02'],
\ }),
\
\ Pl#Hi#Segments(['lustyexplorer:SPLIT', 'minibufexplorer:SPLIT', 'nerdtree:SPLIT', 'tagbar:SPLIT'], {
\ 'n': ['gray3', 'base02'],
\ 'N': ['gray3', 'base02'],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:focus', 'ctrlp:byfname'], {
\ 'n': ['green', 'base03'],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:prev', 'ctrlp:next', 'ctrlp:pwd'], {
\ 'n': ['green', 'base02'],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:item'], {
\ 'n': ['base2', 'darkestblue', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:marked'], {
\ 'n': ['brightgreen', 'base03', ['bold']],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:count'], {
\ 'n': ['base0', 'base03'],
\ }),
\
\ Pl#Hi#Segments(['ctrlp:SPLIT'], {
\ 'n': ['white', 'base03'],
\ }),
\
\ Pl#Hi#Segments(['status'], {
\ 'n': ['green', 'base02'],
\ 'N': ['gray5', 'base02'],
\ }),
\ ])

View File

@ -0,0 +1,141 @@
" Recalculate the trailing whitespace warning when idle, and after saving
autocmd CursorHold,BufWritePost,InsertLeave * unlet! b:statusline_trailing_space_warning
function! Powerline#Functions#GetFilepath() " {{{
" Recalculate the filepath when cwd changes.
let cwd = getcwd()
if exists("b:Powerline_cwd") && cwd != b:Powerline_cwd
unlet! b:Powerline_filepath
endif
let b:Powerline_cwd = cwd
if exists('b:Powerline_filepath')
return b:Powerline_filepath
endif
let dirsep = has('win32') && ! &shellslash ? '\' : '/'
let filepath = expand('%:p')
if empty(filepath)
return ''
endif
let ret = ''
if g:Powerline_stl_path_style == 'short'
" Display a short path where the first directory is displayed with its
" full name, and the subsequent directories are shortened to their
" first letter, i.e. "/home/user/foo/foo/bar/baz.vim" becomes
" "~/foo/f/b/baz.vim"
"
" This displays the shortest possible path, relative to ~ or the
" current directory.
let mod = (exists('+acd') && &acd) ? ':~:h' : ':~:.:h'
let fpath = split(fnamemodify(filepath, mod), dirsep)
let fpath_shortparts = map(fpath[1:], 'v:val[0]')
let ret = join(extend([fpath[0]], fpath_shortparts), dirsep) . dirsep
elseif g:Powerline_stl_path_style == 'relative'
" Display a relative path, similar to the %f statusline item
let ret = fnamemodify(filepath, ':~:.:h') . dirsep
elseif g:Powerline_stl_path_style == 'full'
" Display the full path, similar to the %F statusline item
let ret = fnamemodify(filepath, ':h') . dirsep
endif
if ret == ('.' . dirsep)
let ret = ''
endif
let b:Powerline_filepath = ret
return ret
endfunction " }}}
function! Powerline#Functions#GetShortPath(threshold) " {{{
let fullpath = split(substitute(expand('%:p:h'), $HOME, '~', 'g'), '/')
if len(fullpath) > a:threshold
let fullpath = [fullpath[0], '…'] + fullpath[-a:threshold + 1 :]
endif
return join(fullpath, '/')
endfunction " }}}
function! Powerline#Functions#GetMode() " {{{
let mode = mode()
if mode ==# 'v'
let mode = get(g:, "Powerline_mode_v", "VISUAL")
elseif mode ==# 'V'
let mode = get(g:, "Powerline_mode_V", "V⋅LINE")
elseif mode ==# ''
let mode = get(g:, "Powerline_mode_cv", "V⋅BLOCK")
elseif mode ==# 's'
let mode = get(g:, "Powerline_mode_s", "SELECT")
elseif mode ==# 'S'
let mode = get(g:, "Powerline_mode_S", "S⋅LINE")
elseif mode ==# ''
let mode = get(g:, "Powerline_mode_cs", "S⋅BLOCK")
elseif mode =~# '\vi'
let mode = get(g:, "Powerline_mode_i", "INSERT")
elseif mode =~# '\v(R|Rv)'
let mode = get(g:, "Powerline_mode_R", "REPLACE")
else
" Fallback to normal mode
let mode = get(g:, "Powerline_mode_n", "NORMAL")
endif
return mode
endfunction " }}}
function! Powerline#Functions#GetFilesize() " {{{
let bytes = getfsize(expand("%:p"))
if bytes <= 0
return ''
endif
if bytes < 1024
return bytes . 'B'
else
return (bytes / 1024) . 'kB'
endif
endfunction "}}}
function! Powerline#Functions#GetCharCode() " {{{
" Get the output of :ascii
redir => ascii
silent! ascii
redir END
if match(ascii, 'NUL') != -1
return 'NUL'
endif
" Zero pad hex values
let nrformat = '0x%02x'
let encoding = (&fenc == '' ? &enc : &fenc)
if encoding == 'utf-8'
" Zero pad with 4 zeroes in unicode files
let nrformat = '0x%04x'
endif
" Get the character and the numeric value from the return value of :ascii
" This matches the two first pieces of the return value, e.g.
" "<F> 70" => char: 'F', nr: '70'
let [str, char, nr; rest] = matchlist(ascii, '\v\<(.{-1,})\>\s*([0-9]+)')
" Format the numeric value
let nr = printf(nrformat, nr)
return "'". char ."' ". nr
endfunction "}}}
function! Powerline#Functions#GetWSMarker() " {{{
" Return '...' if trailing white space is detected
" Return '' otherwise
if ! exists("b:statusline_trailing_space_warning")
if search('\s$', 'nw') != 0
let b:statusline_trailing_space_warning = ' … '
else
let b:statusline_trailing_space_warning = ''
endif
endif
return b:statusline_trailing_space_warning
endfunction " }}}

View File

@ -0,0 +1,12 @@
function! Powerline#Functions#ft_man#GetName() " {{{
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 " }}}

View File

@ -0,0 +1,7 @@
function! Powerline#Functions#fugitive#GetBranch(symbol) " {{{
let ret = fugitive#statusline()
let ret = substitute(ret, '\c\v\[?GIT\(([a-z0-9\-_\./:]+)\)\]?', a:symbol .' \1', 'g')
return ret
endfunction " }}}

View File

@ -0,0 +1,17 @@
function! Powerline#Functions#hgrev#Status(symbol) " {{{
if ! exists('*HGRev')
" HGRev hasn't been loaded yet
return ''
endif
if !exists("b:statusline_hg_status")
silent execute "RefreshMercurialRev"
endif
let b:statusline_hg_status=HGRev()
if b:statusline_hg_status != '-'
let ret = "\u26A1". '' . substitute(b:statusline_hg_status, '^[^ ]*', '\1', 'g')
let ret=substitute(ret,' M$','+','g')
else
let ret=''
endif
return ret
endfunction " }}}

View File

@ -0,0 +1,16 @@
function! Powerline#Functions#syntastic#GetErrors(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 " }}}

View File

@ -0,0 +1,13 @@
let g:Powerline#Matches#matches = {
\ 'command_t' : Pl#Match#Add('bufname("%")', 'GoToFile'),
\ 'bt_help' : Pl#Match#Add('&bt' , 'help'),
\ 'ft_man' : Pl#Match#Add('&ft' , 'man'),
\ 'ft_qf' : Pl#Match#Add('&ft' , 'qf'),
\ 'ft_vimpager' : Pl#Match#Add('&ft' , 'vimpager'),
\ 'gundo_preview' : Pl#Match#Add('bufname("%")', '__Gundo_Preview__'),
\ 'gundo_tree' : Pl#Match#Add('bufname("%")', '__Gundo__'),
\ 'lustyexplorer' : Pl#Match#Add('bufname("%")', '\[LustyExplorer-Buffers\]'),
\ 'minibufexplorer' : Pl#Match#Add('bufname("%")', '\-MiniBufExplorer\-'),
\ 'tagbar' : Pl#Match#Add('&ft' , 'tagbar'),
\ 'nerdtree' : Pl#Match#Add('&ft' , 'nerdtree'),
\ }

View File

@ -0,0 +1,30 @@
let g:Powerline#Segments#segments = Pl#Segment#Init([
\ Pl#Segment#Create('SPLIT' , '__split__'),
\ Pl#Segment#Create('TRUNCATE', '__truncate__'),
\
\ Pl#Segment#Create('paste_indicator' , '%{&paste ? "PASTE" : ""}', Pl#Segment#Modes('!N')),
\ Pl#Segment#Create('mode_indicator' , '%{Powerline#Functions#GetMode()}', Pl#Segment#Modes('!N')),
\ Pl#Segment#Create('fileinfo',
\ Pl#Segment#Create('flags.ro' , '%{&readonly ? "$RO" : ""}'),
\ Pl#Segment#Create('filepath' , '%{Powerline#Functions#GetFilepath()}', Pl#Segment#NoPadding()),
\ Pl#Segment#Create('filename' , '%t'),
\ Pl#Segment#Create('flags.mod' , '%M'),
\ Pl#Segment#Create('flags.type' , '%H%W'),
\ ),
\ Pl#Segment#Create('filename' , '%t'),
\ Pl#Segment#Create('filesize' , '%{Powerline#Functions#GetFilesize()}', Pl#Segment#Modes('!N')),
\ Pl#Segment#Create('pwd' , '%{substitute(getcwd(), expand("$HOME"), "~", "g")}'),
\ Pl#Segment#Create('static_str' , '%%{"%s"}'),
\ Pl#Segment#Create('raw' , '%s'),
\ Pl#Segment#Create('fileformat' , '%{&fileformat}', Pl#Segment#Modes('!N')),
\ Pl#Segment#Create('fileencoding' , '%{(&fenc == "" ? &enc : &fenc)}', Pl#Segment#Modes('!N')),
\ Pl#Segment#Create('filetype' , '%{strlen(&ft) ? &ft : "no ft"}', Pl#Segment#Modes('!N')),
\ Pl#Segment#Create('scrollpercent' , '%3p%%'),
\ Pl#Segment#Create('lineinfo',
\ Pl#Segment#Create('line.cur' , '$LINE %3l'),
\ Pl#Segment#Create('line.tot' , ':%-2v', Pl#Segment#NoPadding()),
\ ),
\ Pl#Segment#Create('charcode' , '%{Powerline#Functions#GetCharCode()}', Pl#Segment#Modes('!N')),
\ Pl#Segment#Create('currhigroup' , '%{synIDattr(synID(line("."), col("."), 1), "name")}', Pl#Segment#Modes('!N')),
\ Pl#Segment#Create('ws_marker' , '%{Powerline#Functions#GetWSMarker()}', Pl#Segment#Modes('!N')),
\ ])

View File

@ -0,0 +1,20 @@
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', g:Powerline#Segments#ctrlp#segments#focus)
\ , Pl#Segment#Create('byfname', '%{"%1"}')
\ , Pl#Segment#Create('prev', g:Powerline#Segments#ctrlp#segments#prev)
\ , Pl#Segment#Create('item', '%-9{"%4"}')
\ , 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"}')
\ ])

View File

@ -0,0 +1,3 @@
let g:Powerline#Segments#ft_man#segments = Pl#Segment#Init(['ft_man',
\ Pl#Segment#Create('filename', '%{Powerline#Functions#ft_man#GetName()}')
\ ])

View File

@ -0,0 +1,5 @@
let g:Powerline#Segments#fugitive#segments = Pl#Segment#Init(['fugitive',
\ (exists('g:loaded_fugitive') && g:loaded_fugitive == 1),
\
\ Pl#Segment#Create('branch', '%{Powerline#Functions#fugitive#GetBranch("$BRANCH")}')
\ ])

View File

@ -0,0 +1,4 @@
let g:Powerline#Segments#hgrev#segments = Pl#Segment#Init(['hgrev',
\ (exists('hgrev_loaded')),
\ Pl#Segment#Create('branch', '%{Powerline#Functions#hgrev#Status("$BRANCH")}')
\ ])

View File

@ -0,0 +1,6 @@
let g:Powerline#Segments#rvm#segments = Pl#Segment#Init(['rvm',
\ (exists('g:loaded_rvm') && g:loaded_rvm == 1),
\
\ Pl#Segment#Create('string', '%{rvm#string()}'),
\ Pl#Segment#Create('statusline', '%{rvm#statusline()}')
\ ])

View File

@ -0,0 +1,5 @@
let g:Powerline#Segments#syntastic#segments = Pl#Segment#Init(['syntastic',
\ (exists('g:loaded_syntastic_plugin') && g:loaded_syntastic_plugin == 1),
\
\ Pl#Segment#Create('errors', '%{Powerline#Functions#syntastic#GetErrors("$LINE")}', Pl#Segment#Modes('!N'))
\ ])

View File

@ -0,0 +1,6 @@
let g:Powerline#Segments#tagbar#segments = Pl#Segment#Init(['tagbar',
\ (exists(':Tagbar') > 0),
\
\ Pl#Segment#Create('currenttag', '%{tagbar#currenttag("%s", "")}', Pl#Segment#Modes('!N')),
\ Pl#Segment#Create('fullcurrenttag', '%{tagbar#currenttag("%s", "", "f")}', Pl#Segment#Modes('!N'))
\ ])

View File

@ -0,0 +1,5 @@
let g:Powerline#Segments#virtualenv#segments = Pl#Segment#Init(['virtualenv',
\ has('python') && (exists('g:virtualenv_loaded') && g:virtualenv_loaded == 1),
\
\ Pl#Segment#Create('statusline', '%{virtualenv#statusline()}')
\ ])

View File

@ -0,0 +1,116 @@
let g:Powerline#Themes#default#theme = Pl#Theme#Create(
\ Pl#Theme#Buffer(''
\ , 'paste_indicator'
\ , 'mode_indicator'
\ , 'fugitive:branch'
\ , 'hgrev:branch'
\ , 'fileinfo'
\ , 'syntastic:errors'
\ , Pl#Segment#Truncate()
\ , 'tagbar:currenttag'
\ , Pl#Segment#Split()
\ , 'rvm:string'
\ , 'virtualenv:statusline'
\ , 'fileformat'
\ , 'fileencoding'
\ , 'filetype'
\ , 'scrollpercent'
\ , 'lineinfo'
\ ),
\
\ Pl#Theme#Buffer('command_t'
\ , ['static_str.name', 'Command-T']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , ['raw.line', '%10(Match #%l%)']
\ ),
\
\ Pl#Theme#Buffer('gundo', Pl#Match#Any('gundo_tree')
\ , ['static_str.name', 'Gundo']
\ , ['static_str.buffer', 'Undo tree']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('gundo', Pl#Match#Any('gundo_preview')
\ , ['static_str.name', 'Gundo']
\ , ['static_str.buffer', 'Diff preview']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('bt_help'
\ , ['static_str.name', 'Help']
\ , 'filename'
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , 'scrollpercent'
\ ),
\
\ Pl#Theme#Buffer('ft_vimpager'
\ , ['static_str.name', 'Pager']
\ , 'filename'
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , 'scrollpercent'
\ ),
\
\ Pl#Theme#Buffer('lustyexplorer'
\ , ['static_str.name', 'LustyExplorer']
\ , ['static_str.buffer', 'Buffer list']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('ft_man'
\ , ['static_str.name', 'Man page']
\ , 'filename'
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , 'scrollpercent'
\ ),
\
\ Pl#Theme#Buffer('minibufexplorer'
\ , ['static_str.name', 'MiniBufExplorer']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('ft_qf'
\ , ['static_str.name', 'Quickfix']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('tagbar'
\ , ['static_str.name', 'Tagbar']
\ , ['static_str.buffer', 'Tree']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('ctrlp', Pl#Theme#Callback('ctrlp_main', 'if ! exists("g:ctrlp_status_func") | let g:ctrlp_status_func = {} | endif | let g:ctrlp_status_func.main = "%s"')
\ , 'ctrlp:prev'
\ , 'ctrlp:item'
\ , 'ctrlp:next'
\ , 'ctrlp:marked'
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , 'ctrlp:focus'
\ , 'ctrlp:byfname'
\ , 'pwd'
\ ),
\
\ Pl#Theme#Buffer('ctrlp', Pl#Theme#Callback('ctrlp_prog', 'if ! exists("g:ctrlp_status_func") | let g:ctrlp_status_func = {} | endif | let g:ctrlp_status_func.prog = "%s"')
\ , 'ctrlp:count'
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , 'pwd'
\ ),
\
\ Pl#Theme#Buffer('nerdtree'
\ , ['raw.name', '%{Powerline#Functions#GetShortPath(4)}']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ )
\ )

View File

@ -0,0 +1,116 @@
" Disabled:
" Add the following line into the first theme group to see the highlight
" group
" \ , 'currhigroup'
"
" Line info taken out - I know which line number I'm on from the gutter
"\ , 'lineinfo'
let g:Powerline#Themes#skwp#theme = Pl#Theme#Create(
\ Pl#Theme#Buffer(''
\ , 'fugitive:branch'
\ , 'fileinfo'
\ , 'flags.mod'
\ , 'syntastic:errors'
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , 'sass:status'
\ , 'rvm:string'
\ , 'paste_indicator'
\ ),
\
\ Pl#Theme#Buffer('command_t'
\ , ['static_str.name', 'Command-T']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , ['raw.line', '%10(Match #%l%)']
\ ),
\
\ Pl#Theme#Buffer('gundo', Pl#Match#Any('gundo_tree')
\ , ['static_str.name', 'Gundo']
\ , ['static_str.buffer', 'Undo tree']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('gundo', Pl#Match#Any('gundo_preview')
\ , ['static_str.name', 'Gundo']
\ , ['static_str.buffer', 'Diff preview']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('bt_help'
\ , ['static_str.name', 'Help']
\ , 'filename'
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , 'scrollpercent'
\ ),
\
\ Pl#Theme#Buffer('ft_vimpager'
\ , ['static_str.name', 'Pager']
\ , 'filename'
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , 'scrollpercent'
\ ),
\
\ Pl#Theme#Buffer('lustyexplorer'
\ , ['static_str.name', 'LustyExplorer']
\ , ['static_str.buffer', 'Buffer list']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('ft_man'
\ , ['static_str.name', 'Man page']
\ , 'filename'
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , 'scrollpercent'
\ ),
\
\ Pl#Theme#Buffer('minibufexplorer'
\ , ['static_str.name', 'MiniBufExplorer']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('ft_qf'
\ , ['static_str.name', 'Quickfix']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('tagbar'
\ , ['static_str.name', 'Tagbar']
\ , ['static_str.buffer', 'Tree']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ ),
\
\ Pl#Theme#Buffer('ctrlp', Pl#Theme#Callback('ctrlp_main', 'if ! exists("g:ctrlp_status_func") | let g:ctrlp_status_func = {} | endif | let g:ctrlp_status_func.main = "%s"')
\ , 'ctrlp:prev'
\ , 'ctrlp:item'
\ , 'ctrlp:next'
\ , 'ctrlp:marked'
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , 'ctrlp:focus'
\ , 'ctrlp:byfname'
\ , 'pwd'
\ ),
\
\ Pl#Theme#Buffer('ctrlp', Pl#Theme#Callback('ctrlp_prog', 'if ! exists("g:ctrlp_status_func") | let g:ctrlp_status_func = {} | endif | let g:ctrlp_status_func.prog = "%s"')
\ , 'ctrlp:count'
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ , 'pwd'
\ ),
\
\ Pl#Theme#Buffer('nerdtree'
\ , ['raw.name', '%{Powerline#Functions#GetShortPath(4)}']
\ , Pl#Segment#Truncate()
\ , Pl#Segment#Split()
\ )
\ )