Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updation.

  • Loading branch information...
commit 0995d689d1e9c3c7563384f79749375655f4c053 1 parent 6515860
@theIV authored
Showing with 915 additions and 262 deletions.
  1. +0 −9 vim/bundle/L9/doc/tags-ja
  2. +139 −56 vim/bundle/ctrlp.vim/autoload/ctrlp.vim
  3. +2 −1  vim/bundle/ctrlp.vim/autoload/ctrlp/bookmarkdir.vim
  4. +6 −5 vim/bundle/ctrlp.vim/autoload/ctrlp/tag.vim
  5. +127 −78 vim/bundle/ctrlp.vim/doc/ctrlp.txt
  6. +24 −16 vim/bundle/ctrlp.vim/readme.md
  7. +19 −6 vim/bundle/gist-vim/autoload/gist.vim
  8. +9 −0 vim/bundle/gist-vim/doc/gist-vim.txt
  9. +38 −3 vim/bundle/tabular/autoload/tabular.vim
  10. +38 −3 vim/bundle/tabular/plugin/Tabular.vim
  11. +12 −6 vim/bundle/tagbar/autoload/tagbar.vim
  12. +1 −0  vim/bundle/tagbar/doc/tagbar.txt
  13. +12 −18 vim/bundle/vim-coffee-script/Readme.md
  14. +2 −1  vim/bundle/vim-coffee-script/ftdetect/coffee.vim
  15. +17 −14 vim/bundle/vim-coffee-script/syntax/coffee.vim
  16. +1 −1  vim/bundle/vim-haml/ftdetect/haml.vim
  17. +6 −0 vim/bundle/vim-haml/syntax/sass.vim
  18. +6 −3 vim/bundle/vim-indent-guides/doc/indent_guides.txt
  19. +8 −1 vim/bundle/vim-indent-guides/plugin/indent_guides.vim
  20. +27 −6 vim/bundle/vim-powerline/autoload/Pl/Parser.vim
  21. +2 −2 vim/bundle/vim-powerline/autoload/Powerline/Colorschemes/default.vim
  22. +192 −0 vim/bundle/vim-powerline/autoload/Powerline/Colorschemes/skwp.vim
  23. +16 −9 vim/bundle/vim-powerline/autoload/Powerline/Functions.vim
  24. +8 −0 vim/bundle/vim-powerline/autoload/Powerline/Functions/aurum.vim
  25. +0 −3  vim/bundle/vim-powerline/autoload/Powerline/Functions/cfi.vim
  26. +17 −0 vim/bundle/vim-powerline/autoload/Powerline/Functions/hgrev.vim
  27. +1 −1  vim/bundle/vim-powerline/autoload/Powerline/Matches.vim
  28. +1 −1  vim/bundle/vim-powerline/autoload/Powerline/Segments.vim
  29. +6 −0 vim/bundle/vim-powerline/autoload/Powerline/Segments/aurum.vim
  30. +0 −5 vim/bundle/vim-powerline/autoload/Powerline/Segments/cfi.vim
  31. +4 −0 vim/bundle/vim-powerline/autoload/Powerline/Segments/hgrev.vim
  32. +5 −0 vim/bundle/vim-powerline/autoload/Powerline/Segments/tagbar.vim
  33. +4 −2 vim/bundle/vim-powerline/autoload/Powerline/Themes/default.vim
  34. +116 −0 vim/bundle/vim-powerline/autoload/Powerline/Themes/skwp.vim
  35. +2 −0  vim/bundle/vim-powerline/fontpatcher/fontpatcher
  36. +10 −0 vim/bundle/vim-rails/README.markdown
  37. +6 −7 vim/bundle/vim-rails/autoload/rails.vim
  38. +3 −1 vim/bundle/vim-repeat/autoload/repeat.vim
  39. +5 −0 vim/bundle/vim-ruby/etc/examples/indent/blocks.rb
  40. +15 −0 vim/bundle/vim-ruby/etc/examples/indent/continuations.rb
  41. +1 −1  vim/bundle/vim-ruby/ftplugin/ruby.vim
  42. +7 −3 vim/bundle/vim-ruby/indent/ruby.vim
View
9 vim/bundle/L9/doc/tags-ja
@@ -1,9 +0,0 @@
-!_TAG_FILE_ENCODING utf-8 //
-l9 l9.jax /*l9*
-l9-about l9.jax /*l9-about*
-l9-author l9.jax /*l9-author*
-l9-contact l9.jax /*l9-contact*
-l9-installation l9.jax /*l9-installation*
-l9-introduction l9.jax /*l9-introduction*
-l9-usage l9.jax /*l9-usage*
-l9.txt l9.jax /*l9.txt*
View
195 vim/bundle/ctrlp.vim/autoload/ctrlp.vim
@@ -2,7 +2,7 @@
" File: autoload/ctrlp.vim
" Description: Fuzzy file, buffer, mru and tag finder.
" Author: Kien Nguyen <github.com/kien>
-" Version: 1.7.6
+" Version: 1.7.7
" =============================================================================
" ** Static variables {{{1
@@ -30,11 +30,19 @@ fu! s:ignore() "{{{2
\ '_build$',
\ ]
let igfiles = [
- \ '[.]bak$',
\ '\~$',
\ '#.+#$',
\ '[._].*\.swp$',
\ 'core\.\d+$',
+ \ '\.exe$',
+ \ '\.so$',
+ \ '\.bak$',
+ \ '\.png$',
+ \ '\.jpg$',
+ \ '\.gif$',
+ \ '\.zip$',
+ \ '\.rar$',
+ \ '\.tar\.gz$',
\ ]
retu {
\ 'dir': '\v'.join(igdirs, '|'),
@@ -46,7 +54,6 @@ let [s:pref, s:opts, s:new_opts] = ['g:ctrlp_', {
\ 'arg_map': ['s:argmap', 0],
\ 'buffer_func': ['s:buffunc', {}],
\ 'by_filename': ['s:byfname', 0],
- \ 'clear_cache_on_exit': ['s:clrex', 1],
\ 'custom_ignore': ['s:usrign', s:ignore()],
\ 'default_input': ['s:deftxt', 0],
\ 'dont_split': ['s:nosplit', 'netrw'],
@@ -218,10 +225,11 @@ endf
"}}}1
" * Open & Close {{{1
fu! s:Open()
+ let s:ermsg = v:errmsg
cal s:log(1)
cal s:getenv()
cal s:execextvar('enter')
- sil! exe 'noa keepa' ( s:mwbottom ? 'bo' : 'to' ) '1new ControlP'
+ sil! exe 'noa keepa' ( s:mwbottom ? 'bo' : 'to' ) '1new +setl\ nobl ControlP'
cal s:buffunc(1)
let [s:bufnr, s:prompt, s:winw] = [bufnr('%'), ['', '', ''], winwidth(0)]
abc <buffer>
@@ -256,11 +264,12 @@ fu! s:Close()
cal ctrlp#recordhist()
cal s:execextvar('exit')
cal s:log(0)
+ let v:errmsg = s:ermsg
ec
endf
" * Clear caches {{{1
fu! ctrlp#clr(...)
- let g:ctrlp_new{ a:0 ? a:1 : 'cache' } = 1
+ let [s:matches, g:ctrlp_new{ a:0 ? a:1 : 'cache' }] = [1, 1]
endf
fu! ctrlp#clra()
@@ -319,12 +328,15 @@ fu! s:GlobPath(dirs, depth)
endf
fu! s:UserCmd(lscmd)
- let path = s:dyncwd
+ let [path, lscmd] = [s:dyncwd, a:lscmd]
if exists('+ssl') && &ssl
let [ssl, &ssl, path] = [&ssl, 0, tr(path, '/', '\')]
en
+ if has('win32') || has('win64')
+ let lscmd = substitute(lscmd, '\v(^|&&\s*)\zscd (/d)@!', 'cd /d ', '')
+ en
let path = exists('*shellescape') ? shellescape(path) : path
- let g:ctrlp_allfiles = split(system(printf(a:lscmd, path)), "\n")
+ let g:ctrlp_allfiles = split(system(printf(lscmd, path)), "\n")
if exists('+ssl') && exists('ssl')
let &ssl = ssl
cal map(g:ctrlp_allfiles, 'tr(v:val, "\\", "/")')
@@ -370,9 +382,10 @@ endf
" * MatchedItems() {{{1
fu! s:MatchIt(items, pat, limit, exc)
let [lines, id] = [[], 0]
+ let pat = s:byfname ? split(a:pat, '^[^;]\+\zs;', 1) : a:pat
for item in a:items
let id += 1
- try | if !( s:ispath && item == a:exc ) && call(s:mfunc, [item, a:pat]) >= 0
+ try | if !( s:ispath && item == a:exc ) && call(s:mfunc, [item, pat]) >= 0
cal add(lines, item)
en | cat | brea | endt
if a:limit > 0 && len(lines) >= a:limit | brea | en
@@ -414,10 +427,14 @@ fu! s:SplitPattern(str)
if exists('lst')
let pat = ''
if !empty(lst)
- let pat = lst[0]
- for item in range(1, len(lst) - 1)
- let pat .= '[^'.lst[item - 1].']\{-}'.lst[item]
- endfo
+ if s:byfname && index(lst, ';') > 0
+ let fbar = index(lst, ';')
+ let lst_1 = s:sublist(lst, 0, fbar - 1)
+ let lst_2 = len(lst) - 1 > fbar ? s:sublist(lst, fbar + 1, -1) : ['']
+ let pat = s:buildpat(lst_1).';'.s:buildpat(lst_2)
+ el
+ let pat = s:buildpat(lst)
+ en
en
en
retu escape(pat, '~')
@@ -425,6 +442,7 @@ endf
" * BuildPrompt() {{{1
fu! s:Render(lines, pat)
let [&ma, lines, s:height] = [1, a:lines, min([len(a:lines), s:winh])]
+ let pat = s:byfname ? split(a:pat, '^[^;]\+\zs;', 1)[0] : a:pat
" Setup the match window
sil! exe '%d _ | res' s:height
" Print the new items
@@ -439,7 +457,7 @@ fu! s:Render(lines, pat)
let s:matched = copy(lines)
" Sorting
if !s:nosort()
- let s:compat = a:pat
+ let s:compat = pat
cal sort(lines, 's:mixedsort')
unl s:compat
en
@@ -456,7 +474,7 @@ fu! s:Render(lines, pat)
en
" Highlighting
if s:dohighlight()
- cal s:highlight(a:pat, s:mathi[1])
+ cal s:highlight(pat, s:mathi[1])
en
endf
@@ -566,29 +584,39 @@ fu! s:PrtInsert(...)
let type = s:insertstr()
if type == 'cancel' | retu | en
en
+ if type ==# 'r'
+ let regcont = s:getregs()
+ if regcont < 0 | retu | en
+ en
unl! s:hstgot
let s:act_add = 1
- let s:prompt[0] .= type == 'w' ? s:crword
- \ : type == 's' ? getreg('/')
- \ : type == 'v' ? s:crvisual
- \ : type == 'c' ? substitute(getreg('+'), '\n', '\\n', 'g')
- \ : type == 'f' ? s:crgfile : s:prompt[0]
+ let s:prompt[0] .= type ==# 'w' ? s:crword
+ \ : type ==# 'f' ? s:crgfile
+ \ : type ==# 's' ? s:regisfilter('/')
+ \ : type ==# 'v' ? s:crvisual
+ \ : type ==# 'c' ? s:regisfilter('+')
+ \ : type ==# 'r' ? regcont : ''
cal s:BuildPrompt(1)
unl s:act_add
endf
fu! s:PrtExpandDir()
- let prt = s:prompt
- if prt[0] == '' | retu | en
+ let str = s:prompt[0]
+ if str =~ '\v^\@(cd|lc[hd]?|chd)\s.+' && s:spi
+ let hasat = split(str, '\v^\@(cd|lc[hd]?|chd)\s*\zs')
+ let str = get(hasat, 1, '')
+ en
+ if str == '' | retu | en
unl! s:hstgot
let s:act_add = 1
- let [base, seed] = s:headntail(prt[0])
+ let [base, seed] = s:headntail(str)
let dirs = s:dircompl(base, seed)
if len(dirs) == 1
- let prt[0] = dirs[0]
+ let str = dirs[0]
elsei len(dirs) > 1
- let prt[0] .= s:findcommon(dirs, prt[0])
+ let str .= s:findcommon(dirs, str)
en
+ let s:prompt[0] = exists('hasat') ? hasat[0].str : str
cal s:BuildPrompt(1)
unl s:act_add
endf
@@ -840,17 +868,19 @@ fu! ctrlp#acceptfile(mode, line, ...)
endf
fu! s:SpecInputs(str)
- let spi = !s:itemtype || s:getextvar('specinput') > 0
- if a:str == '..' && spi
- cal s:parentdir(s:dyncwd)
- cal ctrlp#setlines()
+ if a:str =~ '^\.\.\.*$' && s:spi
+ let cwd = s:dyncwd
+ cal ctrlp#setdir('../'.repeat('../', strlen(a:str) - 2))
+ if cwd != s:dyncwd | cal ctrlp#setlines() | en
cal s:PrtClear()
retu 1
- elsei a:str =~ '^[\/]$' && spi
+ elsei a:str == s:lash && s:spi
cal s:SetWD(2, 0)
cal ctrlp#setlines()
cal s:PrtClear()
retu 1
+ elsei a:str =~ '^@.\+' && s:spi
+ retu s:at(a:str)
elsei a:str == '?'
cal s:PrtExit()
let hlpwin = &columns > 159 ? '| vert res 80' : ''
@@ -865,8 +895,8 @@ fu! s:AcceptSelection(mode)
if a:mode == 'e' | if s:SpecInputs(str) | retu | en | en
" Get the selected line
let line = !empty(s:lines) ? s:lines[line('.') - 1] : ''
- if a:mode != 'e' && s:itemtype < 3 && line == ''
- \ && str !~ '\v^(\.\.|/|\\|\?)$'
+ if a:mode != 'e' && !s:itemtype && line == ''
+ \ && str !~ '\v^(\.\.\.*|/|\\|\?|\@.+)$'
cal s:CreateNewFile(a:mode) | retu
en
if empty(line) | retu | en
@@ -945,23 +975,23 @@ fu! s:OpenMulti()
let opts = matchlist(s:opmul, '\v^(\d+)=(\w)=(\w)=$')
if opts == [] | retu | en
let [nr, md, ucr] = opts[1:3]
+ let nopt = exists('g:ctrlp_open_multiple_files')
if s:argmap
let md = s:argmaps(md)
if md == 'cancel' | retu | en
+ let nr = nr == '0' ? ( nopt ? '' : '1' ) : nr
en
let mkd = values(s:marked)
cal s:sanstail(join(s:prompt, ''))
cal s:PrtExit()
- if !nr || md == 'i'
+ if nr == '0' || md == 'i'
retu map(mkd, "s:openfile('bad', fnamemodify(v:val, ':.'), '')")
en
- " Move the cursor to a reusable window
let [tail, fnesc] = [s:tail(), exists('*fnameescape') && v:version > 701]
- let [emptytail, nwpt] = [empty(tail), exists('g:ctrlp_open_multiple_files')]
- let bufnr = bufnr('^'.mkd[0].'$')
+ let [emptytail, bufnr] = [empty(tail), bufnr('^'.mkd[0].'$')]
let useb = bufnr > 0 && buflisted(bufnr) && emptytail
let fst = call('ctrlp#normcmd', useb ? ['b', 'bo vert sb'] : ['e'])
- " Check if it's a replaceable buffer
+ " Check if the current window has a replaceable buffer
let repabl = ( empty(bufname('%')) && empty(&l:ft) ) || s:nosplit()
" Commands for the rest of the files
let [ic, cmds] = [1, { 'v': ['vert sb', 'vne'], 'h': ['sb', 'new'],
@@ -977,7 +1007,7 @@ fu! s:OpenMulti()
let cmd = ic == 1 && ( ucr == 'r' || repabl ) ? fst : snd
let conds = [( nr != '' && nr > 1 && nr < ic ) || ( nr == '' && ic > 1 ),
\ nr != '' && nr < ic]
- if conds[nwpt]
+ if conds[nopt]
if bufnr <= 0 | if fnesc
cal s:openfile('bad', fnamemodify(va, ':.'), '')
el
@@ -1224,11 +1254,6 @@ fu! ctrlp#rmbasedir(items)
retu a:items
endf
-fu! s:parentdir(curr)
- let parent = s:getparent(a:curr)
- if parent != a:curr | cal ctrlp#setdir(parent) | en
-endf
-
fu! s:getparent(item)
let parent = substitute(a:item, '[\/][^\/]\+[\/:]\?$', '', '')
if parent == '' || match(parent, '[\/]') < 0
@@ -1292,7 +1317,6 @@ fu! s:highlight(pat, grp)
if !empty(a:pat) && s:ispath
let pat = s:regexp ? substitute(a:pat, '\\\@<!\^', '^> \\zs', 'g') : a:pat
if s:byfname
- " Match only filename
let pat = substitute(pat, '\[\^\(.\{-}\)\]\\{-}', '[^\\/\1]\\{-}', 'g')
let pat = substitute(pat, '\$\@<!$', '\\ze[^\\/]*$', 'g')
en
@@ -1409,7 +1433,7 @@ fu! s:nosplit()
endf
fu! s:setupblank()
- setl noswf nobl nonu nowrap nolist nospell nocuc wfh
+ setl noswf nonu nowrap nolist nospell nocuc wfh
setl fdc=0 fdl=99 tw=0 bt=nofile bh=unload
if v:version > 702
setl nornu noudf cc=0
@@ -1418,7 +1442,8 @@ endf
fu! s:leavepre()
if exists('s:bufnr') && s:bufnr == bufnr('%') | bw! | en
- if s:clrex && !( has('clientserver') && len(split(serverlist(), "\n")) > 1 )
+ if !( exists('g:ctrlp_clear_cache_on_exit') && !g:ctrlp_clear_cache_on_exit )
+ \ && !( has('clientserver') && len(split(serverlist(), "\n")) > 1 )
cal ctrlp#clra()
en
endf
@@ -1428,7 +1453,34 @@ fu! s:checkbuf()
exe s:bufnr.'bw!'
en
endf
+
+fu! s:iscmdwin()
+ let ermsg = v:errmsg
+ sil! noa winc p
+ sil! noa winc p
+ let [v:errmsg, ermsg] = [ermsg, v:errmsg]
+ retu ermsg =~ '^E11:'
+endf
" Arguments {{{2
+fu! s:at(str)
+ if a:str =~ '\v^\@(cd|lc[hd]?|chd).*'
+ let str = substitute(a:str, '\v^\@(cd|lc[hd]?|chd)\s*', '', '')
+ if str == '' | retu 1 | en
+ let str = str =~ '^%:.\+' ? fnamemodify(s:crfile, str[1:]) : str
+ let path = fnamemodify(expand(str, 1), ':p')
+ if isdirectory(path)
+ if path != s:dyncwd
+ cal ctrlp#setdir(path)
+ cal ctrlp#setlines()
+ en
+ cal ctrlp#recordhist()
+ cal s:PrtClear()
+ en
+ retu 1
+ en
+ retu 0
+endf
+
fu! s:tail()
if exists('s:optail') && !empty('s:optail')
let tailpref = match(s:optail, '^\s*+') < 0 ? ' +' : ' '
@@ -1438,7 +1490,8 @@ fu! s:tail()
endf
fu! s:sanstail(str)
- let [str, pat] = [substitute(a:str, '\\\\', '\', 'g'), '\([^:]\|\\:\)*$']
+ let str = s:spi ? substitute(a:str, '^\(@.*$\|\\\\\ze@\)', '', 'g') : a:str
+ let [str, pat] = [substitute(str, '\\\\', '\', 'g'), '\([^:]\|\\:\)*$']
unl! s:optail
if match(str, '\\\@<!:'.pat) >= 0
let s:optail = matchstr(str, '\\\@<!:\zs'.pat)
@@ -1455,16 +1508,17 @@ fu! s:argmaps(md, ...)
endf
fu! s:insertstr()
- let str = 'Insert: c[w]ord/c[f]ile/[s]earch/[v]isual/[c]lipboard? '
- retu s:choices(str, ['w', 'f', 's', 'v', 'c'], 's:insertstr', [])
+ let str = 'Insert: c[w]ord/c[f]ile/[s]earch/[v]isual/[c]lipboard/[r]egister? '
+ retu s:choices(str, ['w', 'f', 's', 'v', 'c', 'r'], 's:insertstr', [])
+endf
+
+fu! s:textdialog(str)
+ redr | echoh MoreMsg | echon a:str | echoh None
+ retu nr2char(getchar())
endf
fu! s:choices(str, choices, func, args)
- redr
- echoh MoreMsg
- echon a:str
- echoh None
- let char = nr2char(getchar())
+ let char = s:textdialog(a:str)
if index(a:choices, char) >= 0
retu char
elsei char =~# "\\v\<Esc>|\<C-c>|\<C-g>|\<C-u>|\<C-w>|\<C-[>"
@@ -1475,6 +1529,21 @@ fu! s:choices(str, choices, func, args)
en
retu call(a:func, a:args)
endf
+
+fu! s:getregs()
+ let char = s:textdialog('Insert from register: ')
+ if char =~# "\\v\<Esc>|\<C-c>|\<C-g>|\<C-u>|\<C-w>|\<C-[>"
+ cal s:BuildPrompt(0)
+ retu -1
+ elsei char =~# "\<CR>"
+ retu s:getregs()
+ en
+ retu s:regisfilter(char)
+endf
+
+fu! s:regisfilter(reg)
+ retu substitute(getreg(a:reg), "[\t\n]", ' ', 'g')
+endf
" Misc {{{2
fu! s:modevar()
let s:matchtype = s:mtype()
@@ -1483,6 +1552,7 @@ fu! s:modevar()
let s:mfunc = s:mfunc()
let s:nolim = s:getextvar('nolim')
let s:dosort = s:getextvar('sort')
+ let s:spi = !s:itemtype || s:getextvar('specinput') > 0
endf
fu! s:nosort()
@@ -1572,7 +1642,7 @@ fu! s:lastvisual()
let [ovreg, ovtype] = [getreg('v'), getregtype('v')]
let [oureg, outype] = [getreg('"'), getregtype('"')]
sil! norm! gv"vy
- let selected = substitute(getreg('v'), '\n', '\\n', 'g')
+ let selected = s:regisfilter('v')
cal setreg('v', ovreg, ovtype)
cal setreg('"', oureg, outype)
cal winrestview(cview)
@@ -1617,7 +1687,12 @@ fu! s:settype(type)
endf
" Matching {{{2
fu! s:matchfname(item, pat)
- retu match(split(a:item, s:lash)[-1], a:pat)
+ let parts = split(a:item, '[\/]\ze[^\/]\+$')
+ let mfn = match(parts[-1], a:pat[0])
+ retu len(a:pat) == 1 ? mfn : len(a:pat) == 2 ?
+ \ ( mfn >= 0 && ( len(parts) == 2 ? match(parts[0], a:pat[1]) : -1 ) >= 0
+ \ ? 0 : -1 ) : -1
+ en
endf
fu! s:matchtabs(item, pat)
@@ -1628,6 +1703,14 @@ fu! s:matchtabe(item, pat)
retu match(split(a:item, '\t\+[^\t]\+$')[0], a:pat)
endf
+fu! s:buildpat(lst)
+ let pat = a:lst[0]
+ for item in range(1, len(a:lst) - 1)
+ let pat .= '[^'.a:lst[item - 1].']\{-}'.a:lst[item]
+ endfo
+ retu pat
+endf
+
fu! s:mfunc()
let mfunc = 'match'
if s:byfname && s:ispath
@@ -1734,7 +1817,7 @@ fu! ctrlp#setlines(...)
endf
fu! ctrlp#init(type, ...)
- if exists('s:init') | retu | en
+ if exists('s:init') || s:iscmdwin() | retu | en
let [s:matches, s:init] = [1, 1]
cal ctrlp#reset()
cal s:Open()
View
3  vim/bundle/ctrlp.vim/autoload/ctrlp/bookmarkdir.vim
@@ -49,7 +49,8 @@ fu! s:getbookmarks()
endf
fu! s:savebookmark(name, cwd)
- let entries = filter(s:getbookmarks(), 's:parts(v:val)[1] != a:cwd')
+ let cwds = exists('+ssl') ? [tr(a:cwd, '\', '/'), tr(a:cwd, '/', '\')] : [a:cwd]
+ let entries = filter(s:getbookmarks(), 'index(cwds, s:parts(v:val)[1]) < 0')
cal s:writecache(insert(entries, a:name.' '.a:cwd))
endf
View
11 vim/bundle/ctrlp.vim/autoload/ctrlp/tag.vim
@@ -40,19 +40,20 @@ fu! s:findcount(str)
endf
fu! s:filter(tags)
- let [nr, alltags] = [0, a:tags]
+ let nr = 0
wh 0 < 1
- if alltags[nr] =~ '^!' && alltags[nr] !~ '^!_TAG_'
+ if a:tags == [] | brea | en
+ if a:tags[nr] =~ '^!' && a:tags[nr] !~ '^!_TAG_'
let nr += 1
con
en
- if alltags[nr] =~ '^!_TAG_' && len(alltags) > nr
- cal remove(alltags, nr)
+ if a:tags[nr] =~ '^!_TAG_' && len(a:tags) > nr
+ cal remove(a:tags, nr)
el
brea
en
endw
- retu alltags
+ retu a:tags
endf
fu! s:syntax()
View
205 vim/bundle/ctrlp.vim/doc/ctrlp.txt
@@ -1,4 +1,4 @@
-*ctrlp.txt* Fuzzy file, buffer, mru and tag finder. v1.7.6
+*ctrlp.txt* Fuzzy file, buffer, mru and tag finder. v1.7.7
*CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'*
===============================================================================
# #
@@ -25,7 +25,7 @@ INTRO *ctrlp-intro*
Full path fuzzy file, buffer, mru and tag finder with an intuitive interface.
Written in pure Vimscript for MacVim and Vim version 7.0+. Has full support for
-Vims |regexp| as search pattern, built-in MRU files monitoring, projects root
+Vim's |regexp| as search pattern, built-in MRU files monitoring, project's root
finder, and more.
To enable optional extensions (tag, dir, rtscript...), see |ctrlp-extensions|.
@@ -45,7 +45,7 @@ Overview:~
|ctrlp_max_height| Max height of the match window.
|ctrlp_switch_buffer| Jump to an open buffer if already opened.
|ctrlp_reuse_window| Reuse special windows (help, quickfix, etc).
- |ctrlp_working_path_mode| How to set CtrlPs local working directory.
+ |ctrlp_working_path_mode| How to set CtrlP's local working directory.
|ctrlp_root_markers| Additional, high priority root markers.
|ctrlp_use_caching| Use per-session caching or not.
|ctrlp_clear_cache_on_exit| Keep cache after exiting Vim or not.
@@ -67,14 +67,14 @@ Overview:~
MRU mode:
|ctrlp_mruf_max| Max MRU entries to remember.
- |ctrlp_mruf_exclude| Files that shouldnt be remembered.
+ |ctrlp_mruf_exclude| Files that shouldn't be remembered.
|ctrlp_mruf_include| Files to be remembered.
|ctrlp_mruf_relative| Show only MRU files in the working directory.
|ctrlp_mruf_default_order| Disable sorting.
|ctrlp_mruf_case_sensitive| MRU files are case sensitive or not.
Advanced options:
- |ctrlp_status_func| Change CtrlPs two statuslines.
+ |ctrlp_status_func| Change CtrlP's two statuslines.
|ctrlp_buffer_func| Call custom functions in the CtrlP buffer.
|ctrlp_match_func| Replace the built-in matching algorithm.
@@ -126,12 +126,12 @@ Set the maximum height of the match window: >
<
*'g:ctrlp_switch_buffer'*
-When opening a file with <cr> or <c-t>, if the files already opened somewhere
+When opening a file with <cr> or <c-t>, if the file's already opened somewhere
CtrlP will try to jump to it instead of opening a new instance: >
let g:ctrlp_switch_buffer = 2
<
- 1 - only jump to the buffer if its opened in the current tab.
- 2 - jump tab as well if the buffers opened in another tab.
+ 1 - only jump to the buffer if it's opened in the current tab.
+ 2 - jump tab as well if the buffer's opened in another tab.
0 - disable this feature.
*'g:ctrlp_reuse_window'*
@@ -150,10 +150,10 @@ When starting up, CtrlP sets its local working directory according to this
variable: >
let g:ctrlp_working_path_mode = 2
<
- 1 - the parent directory of the current file.
+ 1 - the directory of the current file.
2 - the nearest ancestor that contains one of these directories or files:
.git/ .hg/ .svn/ .bzr/ _darcs/
- 0 - dont manage working directory.
+ 0 - don't manage working directory.
Note: you can use b:ctrlp_working_path_mode (a |b:var|) to set this option on a
per buffer basis.
@@ -182,7 +182,7 @@ Set the directory to store the cache files: >
<
*'g:ctrlp_dotfiles'*
-Set this to 0 if you dont want CtrlP to scan for dotfiles and dotdirs: >
+Set this to 0 if you don't want CtrlP to scan for dotfiles and dotdirs: >
let g:ctrlp_dotfiles = 1
<
You can use |'wildignore'| to exclude anything from the search.
@@ -225,7 +225,7 @@ The maximum depth of a directory tree to recurse into: >
Note: the larger these values, the more memory Vim uses.
*'g:ctrlp_user_command'*
-Specify an external tool to use for listing files instead of using Vims
+Specify an external tool to use for listing files instead of using Vim's
|globpath()|. Use %s in place of the target directory: >
let g:ctrlp_user_command = ''
<
@@ -265,10 +265,10 @@ when searching outside a repo.
*'g:ctrlp_max_history'*
The maximum number of input strings you want CtrlP to remember. The default
-value mirrors Vims global |'history'| option: >
+value mirrors Vim's global |'history'| option: >
let g:ctrlp_max_history = &history
<
-Set to 0 to disable prompts history. Browse the history with <c-n> and <c-p>.
+Set to 0 to disable prompt's history. Browse the history with <c-n> and <c-p>.
*'g:ctrlp_open_new_file'*
Use this option to specify how the newly created file is to be opened when
@@ -289,13 +289,14 @@ Example: >
let g:ctrlp_open_multiple_files = '2vr'
<
For the number:
- - If given, itll be used as the maximum number of windows or tabs to create
+ - If given, it'll be used as the maximum number of windows or tabs to create
when opening the files (the rest will be opened as hidden buffers).
- If not given, <c-o> will open all files, each in a new window or new tab.
For the letters:
t - each file in a new tab.
h - each file in a new horizontal split.
v - each file in a new vertical split.
+ i - all files as hidden buffers.
Reuse the current window:
tr,
hr,
@@ -324,14 +325,14 @@ When enabled, looped internal symlinks will be ignored to avoid duplicates.
*'g:ctrlp_lazy_update'*
Set this to 1 to enable the lazy-update feature: only update the match window
-after typings been stopped for a certain amount of time: >
+after typing's been stopped for a certain amount of time: >
let g:ctrlp_lazy_update = 0
<
If is 1, update after 250ms. If bigger than 1, the number will be used as the
delay time in milliseconds.
*'g:ctrlp_default_input'*
-Set this to 1 to enable seeding the prompt with the current files relative
+Set this to 1 to enable seeding the prompt with the current file's relative
path: >
let g:ctrlp_default_input = 0
<
@@ -343,8 +344,8 @@ works in regexp mode. To split the pattern, separate words with space: >
<
*'g:ctrlp_prompt_mappings'*
-Use this to customize the mappings inside CtrlPs prompt to your liking. You
-only need to keep the lines that youve changed the values (inside []): >
+Use this to customize the mappings inside CtrlP's prompt to your liking. You
+only need to keep the lines that you've changed the values (inside []): >
let g:ctrlp_prompt_mappings = {
\ 'PrtBS()': ['<bs>', '<c-]>'],
\ 'PrtDelete()': ['<del>'],
@@ -382,9 +383,9 @@ only need to keep the lines that you’ve changed the values (inside []): >
\ 'PrtExit()': ['<esc>', '<c-c>', '<c-g>'],
\ }
<
-Note: In some terminals, its not possible to remap <c-h> without also changing
+Note: In some terminals, it's not possible to remap <c-h> without also changing
<bs> (|keycodes|). So if pressing <bs> moves the cursor to the left instead of
-deleting a char for you, add this to your |.vimrc| to disable the plugins
+deleting a char for you, add this to your |.vimrc| to disable the plugin's
default <c-h> mapping: >
let g:ctrlp_prompt_mappings = { 'PrtCurLeft()': ['<left>', '<c-^>'] }
<
@@ -398,7 +399,7 @@ Specify the number of recently opened files you want CtrlP to remember: >
<
*'g:ctrlp_mruf_exclude'*
-Files you dont want CtrlP to remember. Use regexp to specify the patterns: >
+Files you don't want CtrlP to remember. Use regexp to specify the patterns: >
let g:ctrlp_mruf_exclude = ''
<
Examples: >
@@ -572,17 +573,18 @@ MAPPINGS *ctrlp-mappings*
<c-p>
Default |Normal| mode mapping to open the CtrlP prompt in find file mode.
+----------------------------------------
Once inside the prompt:~
<c-d>
Toggle between full-path search and filename only search.
- Note: in filename mode, the prompts base is '>d>' instead of '>>>'
+ Note: in filename mode, the prompt's base is '>d>' instead of '>>>'
<c-r> *'ctrlp-fullregexp'*
Toggle between the string mode and full regexp mode.
- Note: in full regexp mode, the prompts base is 'r>>' instead of '>>>'
+ Note: in full regexp mode, the prompt's base is 'r>>' instead of '>>>'
- See also |input-formats| (guide) and |g:ctrlp_regexp_search| (option).
+ See also: |input-formats| (guide) and |g:ctrlp_regexp_search| (option).
<c-f>, 'forward'
<c-up>
@@ -592,13 +594,19 @@ Once inside the prompt:~
<c-down>
Scroll to the 'previous' search mode in the sequence.
- <tab>
+ <tab> *'ctrlp-autocompletion'*
Auto-complete directory names under the current working directory inside
the prompt.
<s-tab>
Toggle the focus between the match window and the prompt.
+ <esc>,
+ <c-c>
+ Exit CtrlP.
+
+Movement:~
+
<c-j>,
<down>
Move selection down.
@@ -622,6 +630,8 @@ Once inside the prompt:~
<right>
Move the cursor one character to the 'right'.
+Editing:~
+
<c-]>,
<bs>
Delete the preceding character.
@@ -635,6 +645,16 @@ Once inside the prompt:~
<c-u>
Clear the input field.
+Input history:~
+
+ <c-n>
+ Next string in the prompt's history.
+
+ <c-p>
+ Previous string in the prompt's history.
+
+Open a file:~
+
<cr>
Open selected file in the active window if possible.
@@ -652,38 +672,39 @@ Once inside the prompt:~
<c-y>
Create a new file and its parent directories.
- <c-n>
- Next string in the prompt’s history.
-
- <c-p>
- Previous string in the prompt’s history.
+Open multiple files:~
<c-z>
- Mark/unmark a file to be opened with <c-o>.
- - Or mark/unmark a file to create a new file in its directory using <c-y>.
+ - Mark/unmark a file to create a new file in its directory using <c-y>.
<c-o>
Open files marked by <c-z>.
+Function keys:~
+
<F5>
- Refresh the match window and purge the cache for the current directory.
- - Or remove deleted files from the MRU list.
+ - Remove deleted files from the MRU list.
<F7>
- Wipe the MRU list.
- - Or delete MRU entries marked by <c-z>.
+ - Delete MRU entries marked by <c-z>.
- <insert>
- Insert the word under the cursor (in the current buffer) into the prompt.
+Pasting:~
- <esc>,
- <c-c>,
- <c-g>
- Exit CtrlP.
- Note: <c-c> can also be used to stop the scan if it’s taking too long.
+ <Insert>, *'ctrlp-pasting'*
+ <MiddleMouse>
+ Paste the clipboard content into the prompt.
+
+ <c-\>
+ Open a text dialog to paste <cword>, <cfile>, the content of the search
+ register, the last visual selection, the clipboard or any register into the
+ prompt.
Choose your own mappings with |g:ctrlp_prompt_mappings|.
+----------------------------------------
When inside the match window (press <s-tab> to switch):~
a-z
@@ -701,7 +722,7 @@ a) Simple string.
E.g. 'abc' is understood internally as 'a[^a]\{-}b[^b]\{-}c'
-b) When in regexp mode, the input strings treated as a Vims regexp |pattern|
+b) When in regexp mode, the input string's treated as a Vim's regexp |pattern|
without any modification.
E.g. 'abc\d*efg' will be read as 'abc\d*efg'.
@@ -714,43 +735,57 @@ c) End the string with a colon ':' followed by a Vim command to execute that
with a backslash: '\:'. When opening multiple files, the command will be
executed on each opening file.
- E.g. 'abc:45' will open the selected file and jump to line 45.
+ E.g. Use ':45' to jump to line 45.
- 'abc:/any\:string' will open the selected file and jump to the first
- instance of 'any:string'.
+ Use ':/any\:string' to jump to the first instance of 'any:string'.
- 'abc:+setf\ myfiletype|50' will open the selected file and set its
- filetype to 'myfiletype', then jump to line 50.
+ Use ':+setf\ myfiletype|50' to set the filetype to 'myfiletype', then
+ jump to line 50.
- 'abc:diffthis' will open the selected files and run |:diffthis| on the
- first 4 files (if marked).
+ Use ':diffthis' when opening multiple files to run |:diffthis| on the
+ first 4 files.
+
+ See also: Vim's |++opt| and |+cmd|.
+
+d) Submit two dots '..' to go backward the directory tree by 1 level. To go
+ backward multiple levels, use one extra dot for each extra level:
+>
+ Raw input Interpreted as
+ .. ../
+ ... ../../
+ .... ../../../
+<
+ Note: if the parent directories are large and uncached, this can be slow.
- See also Vim’s |++opt| and |+cmd|.
+ You can also use '@cd path/' to change CtrlP's local working directory.
+ Use '@cd %:h' to change to the directory of the current file.
-d) Type exactly two dots '..' at the start of the prompt and press enter to go
- backward in the directory tree by 1 level. If the parent directory is
- large, this might be slow.
+e) Similarly, submit '/' or '\' to find and go to the project's root.
-e) Similarly, submit '/' or '\' to find and go to the project’s root. If the
- project is large, using a VCS listing command to look for files might help
- speeding up the intial scan (see |g:ctrlp_user_command| for more details).
+ If the project is large, using a VCS listing command to look for files
+ might help speeding up the intial scan (see |g:ctrlp_user_command| for more
+ details).
- Note: e) and d) only work in find file mode and directory mode.
+ Note: e) and d) only work in file, directory and mixed modes.
f) Type the name of a non-existent file and press <c-y> to create it. Mark a
file with <c-z> to create the new file in the same directory as the marked
file.
- E.g. 'parentdir/newfile.txt' will create a directory named 'parentdir' as
- well as 'newfile.txt'.
+ E.g. Using 'newdir/newfile.txt' will create a directory named 'newdir' as
+ well as a file named 'newfile.txt'.
- If 'some/old/dirs/oldfile.txt' is marked with <c-z>, then 'parentdir'
- and 'newfile.txt' will be created in 'some/old/dirs'. The final path
- will then be 'some/old/dirs/parentdir/newfile.txt'.
+ If an entry 'some/old/dirs/oldfile.txt' is marked with <c-z>, then
+ 'newdir' and 'newfile.txt' will be created under 'some/old/dirs'. The
+ final path will then be 'some/old/dirs/newdir/newfile.txt'.
- Use '\' in place of '/' on Windows (if |'ssl'| is not set).
+ Note: use '\' in place of '/' on Windows (if |'shellslash'| is not set).
-g) Submit ? to open this help file.
+g) In filename mode (toggle with <c-d>), you can use one primary pattern and
+ one refining pattern separated by a semicolon. Both patterns work like (a),
+ or (b) when in regexp mode.
+
+h) Submit ? to open this help file.
===============================================================================
EXTENSIONS *ctrlp-extensions*
@@ -770,7 +805,7 @@ Available extensions:~
- Name: 'tag'
- Command: ':CtrlPTag'
- Search for a tag within a generated central tags file, and jump to the
- definition. Use the Vims option |'tags'| to specify the names and the
+ definition. Use the Vim's option |'tags'| to specify the names and the
locations of the tags file(s).
E.g. set tags+=doc/tags
@@ -798,7 +833,7 @@ Available extensions:~
+ <cr> change the local working directory for CtrlP and keep it open.
+ <c-t> change the global working directory (exit).
+ <c-v> change the local working directory for the current window (exit).
- + <c-x> change the global working directory to CtrlPs current local
+ + <c-x> change the global working directory to CtrlP's current local
working directory (exit).
*:CtrlPRTS*
@@ -848,18 +883,18 @@ Available extensions:~
+ <c-v> change the local working directory for the current window (exit).
+ <F7>
- Wipe bookmark list.
- - Or delete entries marked by <c-z>.
+ - Delete entries marked by <c-z>.
----------------------------------------
Buffer Tag mode options:~
*'g:ctrlp_buftag_ctags_bin'*
-If ctags isnt in your $PATH, use this to set its location: >
+If ctags isn't in your $PATH, use this to set its location: >
let g:ctrlp_buftag_ctags_bin = ''
<
*'g:ctrlp_buftag_systemenc'*
-Match this with your OSs encoding (not Vims). The default value mirrors Vims
+Match this with your OS's encoding (not Vim's). The default value mirrors Vim's
global |'encoding'| option: >
let g:ctrlp_buftag_systemenc = &encoding
<
@@ -886,12 +921,12 @@ Highlighting:~
CtrlPNoEntries : the message when no match is found (Error)
CtrlPMatch : the matched pattern (Identifier)
CtrlPLinePre : the line prefix '>' in the match window
- CtrlPPrtBase : the prompts base (Comment)
- CtrlPPrtText : the prompts text (|hl-Normal|)
- CtrlPPrtCursor : the prompts cursor when moving over the text (Constant)
+ CtrlPPrtBase : the prompt's base (Comment)
+ CtrlPPrtText : the prompt's text (|hl-Normal|)
+ CtrlPPrtCursor : the prompt's cursor when moving over the text (Constant)
* In extensions:
- CtrlPTabExtra : the part of each line thats not matched against (Comment)
+ CtrlPTabExtra : the part of each line that's not matched against (Comment)
CtrlPBufName : the buffer name an entry belongs to (|hl-Directory|)
CtrlPTagKind : the kind of the tag in buffer-tag mode (|hl-Title|)
CtrlPqfLineCol : the line and column numbers in quickfix mode (Comment)
@@ -913,7 +948,7 @@ Statuslines:~
===============================================================================
MISCELLANEOUS CONFIGS *ctrlp-miscellaneous-configs*
-* Use |wildignore| for |g:ctrlp_user_command|:
+* Using |wildignore| for |g:ctrlp_user_command|:
>
function! s:wig2cmd()
" Change wildignore into space or | separated groups
@@ -935,8 +970,8 @@ MISCELLANEOUS CONFIGS *ctrlp-miscellaneous-configs*
<
(submitted by Rich Alesi <github.com/ralesi>)
-* A standalone function to set the working directory to the projects root, or
- to the parent directory of the current file if a root cant be found:
+* A standalone function to set the working directory to the project's root, or
+ to the parent directory of the current file if a root can't be found:
>
function! s:setcwd()
let cph = expand('%:p:h', 1)
@@ -952,12 +987,18 @@ MISCELLANEOUS CONFIGS *ctrlp-miscellaneous-configs*
<
(requires Vim 7.1.299+)
+* Using a |count| to invoke different commands using the same mapping:
+>
+ let g:ctrlp_map = '<leader>f'
+ let g:ctrlp_cmd = 'exe "CtrlP".get(["", "Buffer", "MRU"], v:count)'
+<
+
===============================================================================
CREDITS *ctrlp-credits*
Developed by Kien Nguyen <github.com/kien>.
-Projects homepage: http://kien.github.com/ctrlp.vim
+Project's homepage: http://kien.github.com/ctrlp.vim
Git repository: https://github.com/kien/ctrlp.vim
Mercurial repository: https://bitbucket.org/kien/ctrlp.vim
@@ -979,10 +1020,18 @@ Special thanks:~
* Kent Sibilev <github.com/datanoise>
* Tacahiroy <github.com/tacahiroy>
* Luca Pette <github.com/lucapette>
+ * Seth Fowler <github.com/sfowler>
===============================================================================
CHANGELOG *ctrlp-changelog*
+Before 2012/05/15~
+
+ + Extend '..' (|ctrlp-input-formats| (d))
+ + New input format: '@cd' (|ctrlp-input-formats| (d))
+
+Before 2012/04/30~
+
+ New option: |g:ctrlp_mruf_default_order|
+ New feature: Bookmarked directories extension.
+ New commands: |:CtrlPBookmarkDir|
@@ -1059,7 +1108,7 @@ Before 2011/10/30~
Before 2011/10/12~
+ New features: Open multiple files.
- Pass Vims |++opt| and |+cmd| to the opening file
+ Pass Vim's |++opt| and |+cmd| to the opening file
(|ctrlp-input-formats| (c))
Auto-complete each dir for |:CtrlP| [starting-directory]
+ New mappings: <c-z> mark/unmark a file to be opened with <c-o>.
View
40 vim/bundle/ctrlp.vim/readme.md
@@ -5,28 +5,30 @@ Full path fuzzy __file__, __buffer__, __mru__ and __tag__ finder for Vim.
* Full support for Vim’s regexp as search pattern.
* Built-in Most Recently Used (MRU) files monitoring.
* Built-in project’s root finder.
-* Open Multiple Files.
+* Open multiple files at once.
+* Create new files and directories.
* [Extensible][3].
![ctrlp][1]
## Basic Usage
-* Press `<c-p>` or run `:CtrlP` to invoke CtrlP in find file mode.
+* Press `<c-p>` or run `:CtrlP [dir]` to invoke CtrlP in find file mode.
* Run `:CtrlPBuffer` or `:CtrlPMRU` to invoke CtrlP in buffer or MRU mode.
-* Or run `:CtrlPMixed` to search in a mix of files, buffers and MRU files.
+* Run `:CtrlPMixed` to search in a mix of files, buffers and MRU files.
Once CtrlP is open:
-* Press `<c-f>` and `<c-b>` to switch between find file, buffer, and MRU file
-modes.
+* Press `<c-f>` and `<c-b>` to cycle between modes.
* Press `<c-d>` to switch to filename only search instead of full path.
* Press `<c-r>` to switch to regexp mode.
* Press `<F5>` to purge the cache for the current directory and get new files.
-* End the input string with a colon `:` followed by a command to execute after
-opening the file.
-e.g. `abc:45` will open the file matched the pattern and jump to line 45.
-* Submit two dots `..` as the input string to go backward the directory tree by
-1 level.
+* End the input string with a colon `:` followed by a command to execute it
+after opening the file:
+Use `:45` to jump to line 45.
+Use `:/any\:string` to jump to the first instance of `any:string`.
+Use `:difft` when opening multiple files to run `:difft` on the first 4 files.
+* Submit two or more dots `.` as the input string to go backward the directory
+tree by one or multiple levels.
* Use `<c-y>` to create a new file and its parent dirs.
* Use `<c-z>` to mark/unmark multiple files and `<c-o>` to open them.
@@ -37,20 +39,20 @@ e.g. `abc:45` will open the file matched the pattern and jump to line 45.
let g:ctrlp_map = '<c-p>'
```
-* When CtrlP is invoked, it automatically sets its local working directory
-according to this variable:
+* When invoked, unless a starting directory is specified, CtrlP will
+automatically set its local working directory according to this variable:
```vim
let g:ctrlp_working_path_mode = 2
```
0 - don’t manage working directory.
- 1 - the parent directory of the current file.
+ 1 - the directory of the current file.
2 - the nearest ancestor that contains one of these directories or files:
`.git/` `.hg/` `.svn/` `.bzr/` `_darcs/`
-* If you want to exclude directories or files from the search, use the Vim’s
-option `wildignore` and/or the option `g:ctrlp_custom_ignore`. Examples:
+* To exclude files or directories from the search, use the Vim’s option
+`wildignore` and/or the option `g:ctrlp_custom_ignore`:
```vim
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
@@ -64,13 +66,19 @@ option `wildignore` and/or the option `g:ctrlp_custom_ignore`. Examples:
\ }
```
-* Use a custom file listing command with:
+* Use a custom file listing command:
```vim
let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux
let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows
```
+* Define an external matcher:
+
+ ```vim
+ let g:ctrlp_match_func = {}
+ ```
+
_Check [the docs][2] for more mappings, commands and options._
[1]: http://i.imgur.com/yIynr.png
View
25 vim/bundle/gist-vim/autoload/gist.vim
@@ -1,7 +1,7 @@
"=============================================================================
" File: gist.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
-" Last Change: 16-Apr-2012.
+" Last Change: 11-May-2012.
" Version: 6.5
" WebPage: http://github.com/mattn/gist-vim
" License: BSD
@@ -220,7 +220,7 @@ function! s:GistGet(gistid, clipboard)
let &undolevels = old_undolevels
setlocal buftype=acwrite bufhidden=delete noswapfile
setlocal nomodified
- doau StdinReadPost <buffer>
+ doau StdinReadPost,BufRead,BufReadPost
let gist_detect_filetype = get(g:, 'gist_detect_filetype', 0)
if (&ft == '' && gist_detect_filetype == 1) || gist_detect_filetype == 2
call s:GistDetectFiletype(a:gistid)
@@ -270,11 +270,24 @@ function! s:GistUpdate(content, gistid, gistnm, desc)
if has_key(b:gist, 'description') | let gist["description"] = b:gist.description | endif
if has_key(b:gist, 'filename') | let filename = b:gist.filename | endif
else
- if a:desc != ' ' | let gist["description"] = a:desc | endif
let filename = a:gistnm
if len(filename) == 0 | let filename = s:GistGetFileName(a:gistid) | endif
if len(filename) == 0 | let filename = s:get_current_filename(1) | endif
endif
+
+ " Update description
+ " If no new description specified, keep the old description
+ if a:desc != ' '
+ let gist["description"] = a:desc
+ else
+ let res = webapi#http#get('https://api.github.com/gists/'.a:gistid, '', { "Authorization": s:GetAuthHeader() })
+ let status = matchstr(matchstr(res.header, '^Status:'), '^[^:]\+: \zs.*')
+ if status =~ '^2'
+ let old_gist = webapi#json#decode(res.content)
+ let gist["description"] = old_gist.description
+ endif
+ endif
+
let gist.files[filename] = { "content": a:content, "filename": filename }
redraw | echon 'Updating gist... '
@@ -296,7 +309,7 @@ function! s:GistUpdate(content, gistid, gistnm, desc)
endfunction
function! s:GistDelete(gistid)
- redraw | echon 'Deleting to gist... '
+ redraw | echon 'Deleting gist... '
let res = webapi#http#post('https://api.github.com/gists/'.a:gistid, '', { "Authorization": s:GetAuthHeader() }, 'DELETE')
let status = matchstr(matchstr(res.header, '^Status:'), '^[^:]\+: \zs.*')
if status =~ '^2'
@@ -313,7 +326,7 @@ endfunction
function! s:get_current_filename(no)
let filename = expand('%:t')
if len(filename) == 0 && &ft != ''
- let pair = filter(items(s:extmap), 'v:val[1] == "ruby"')
+ let pair = filter(items(s:extmap), 'v:val[1] == &ft')
if len(pair) > 0
let filename = printf('gistfile%d%s', a:no, pair[0][0])
endif
@@ -431,7 +444,7 @@ function! gist#Gist(count, line1, line2, ...)
if bufname =~ bufnamemx
let gistidbuf = matchstr(bufname, bufnamemx)
else
- let gistidbuf = matchstr(join(getline(a:line1, a:line2), "\n"), '\(GistID:\s*\)\@<=[0-9]\+')
+ let gistidbuf = matchstr(join(getline(a:line1, a:line2), "\n"), '\(GistID:\s*\)\@<=\S\+')
endif
let args = (a:0 > 0) ? s:shellwords(a:1) : []
View
9 vim/bundle/gist-vim/doc/gist-vim.txt
@@ -146,6 +146,15 @@ If you want to edit all files for gists containing more than one: >
let g:gist_get_multiplefile = 1
<
+
+If you want to update a gist, embed >
+
+ GistID: xxxxx
+>
+in your local file, then call >
+
+ :Gist
+>
==============================================================================
REQUIREMENTS *gist-vim-requirements*
View
41 vim/bundle/tabular/autoload/tabular.vim
@@ -1,7 +1,42 @@
" Tabular: Align columnar data using regex-designated column boundaries
-" Maintainer: Matthew Wozniski (mjw@drexel.edu)
-" Date: Thu, 11 Oct 2007 00:35:34 -0400
-" Version: 0.1
+" Maintainer: Matthew Wozniski (godlygeek@gmail.com)
+" Date: Thu, 03 May 2012 20:49:32 -0400
+" Version: 1.0
+"
+" Long Description:
+" Sometimes, it's useful to line up text. Naturally, it's nicer to have the
+" computer do this for you, since aligning things by hand quickly becomes
+" unpleasant. While there are other plugins for aligning text, the ones I've
+" tried are either impossibly difficult to understand and use, or too simplistic
+" to handle complicated tasks. This plugin aims to make the easy things easy
+" and the hard things possible, without providing an unnecessarily obtuse
+" interface. It's still a work in progress, and criticisms are welcome.
+"
+" License:
+" Copyright (c) 2012, Matthew J. Wozniski
+" All rights reserved.
+"
+" Redistribution and use in source and binary forms, with or without
+" modification, are permitted provided that the following conditions are met:
+" * Redistributions of source code must retain the above copyright notice,
+" this list of conditions and the following disclaimer.
+" * Redistributions in binary form must reproduce the above copyright
+" notice, this list of conditions and the following disclaimer in the
+" documentation and/or other materials provided with the distribution.
+" * The names of the contributors may not be used to endorse or promote
+" products derived from this software without specific prior written
+" permission.
+"
+" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS
+" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+" NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT,
+" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+" OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
" Stupid vimscript crap {{{1
let s:savecpo = &cpo
View
41 vim/bundle/tabular/plugin/Tabular.vim
@@ -1,7 +1,42 @@
" Tabular: Align columnar data using regex-designated column boundaries
-" Maintainer: Matthew Wozniski (mjw@drexel.edu)
-" Date: Thu, 11 Oct 2007 00:35:34 -0400
-" Version: 0.1
+" Maintainer: Matthew Wozniski (godlygeek@gmail.com)
+" Date: Thu, 03 May 2012 20:49:32 -0400
+" Version: 1.0
+"
+" Long Description:
+" Sometimes, it's useful to line up text. Naturally, it's nicer to have the
+" computer do this for you, since aligning things by hand quickly becomes
+" unpleasant. While there are other plugins for aligning text, the ones I've
+" tried are either impossibly difficult to understand and use, or too simplistic
+" to handle complicated tasks. This plugin aims to make the easy things easy
+" and the hard things possible, without providing an unnecessarily obtuse
+" interface. It's still a work in progress, and criticisms are welcome.
+"
+" License:
+" Copyright (c) 2012, Matthew J. Wozniski
+" All rights reserved.
+"
+" Redistribution and use in source and binary forms, with or without
+" modification, are permitted provided that the following conditions are met:
+" * Redistributions of source code must retain the above copyright notice,
+" this list of conditions and the following disclaimer.
+" * Redistributions in binary form must reproduce the above copyright
+" notice, this list of conditions and the following disclaimer in the
+" documentation and/or other materials provided with the distribution.
+" * The names of the contributors may not be used to endorse or promote
+" products derived from this software without specific prior written
+" permission.
+"
+" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS
+" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+" NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT,
+" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+" OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
" Abort if running in vi-compatible mode or the user doesn't want us.
if &cp || exists('g:tabular_loaded')
View
18 vim/bundle/tagbar/autoload/tagbar.vim
@@ -1566,6 +1566,7 @@ function! s:OpenWindow(flags)
if autoclose
let w:autoclose = autoclose
endif
+ call s:HighlightTag(1, curline)
endif
call s:LogDebugMessage("OpenWindow finished, Tagbar already open")
return
@@ -1595,7 +1596,7 @@ function! s:OpenWindow(flags)
call s:InitWindow(autoclose)
call s:AutoUpdate(curfile)
- call s:HighlightTag(curline)
+ call s:HighlightTag(1, curline)
if !(g:tagbar_autoclose || autofocus || g:tagbar_autofocus)
call s:winexec('wincmd p')
@@ -2566,7 +2567,7 @@ endfunction
" User actions {{{1
" s:HighlightTag() {{{2
-function! s:HighlightTag(...)
+function! s:HighlightTag(openfolds, ...)
let tagline = 0
if a:0 > 0
@@ -2603,7 +2604,7 @@ function! s:HighlightTag(...)
return
endif
- if g:tagbar_autoshowtag
+ if g:tagbar_autoshowtag || a:openfolds
call s:OpenParents(tag)
endif
@@ -2708,12 +2709,12 @@ function! s:JumpToTag(stay_in_tagbar)
redraw
if a:stay_in_tagbar
- call s:HighlightTag()
+ call s:HighlightTag(0)
call s:winexec(tagbarwinnr . 'wincmd w')
elseif g:tagbar_autoclose || autoclose
call s:CloseWindow()
else
- call s:HighlightTag()
+ call s:HighlightTag(0)
endif
endfunction
@@ -2974,7 +2975,7 @@ function! s:AutoUpdate(fname)
call s:known_files.setCurrent(fileinfo)
endif
- call s:HighlightTag()
+ call s:HighlightTag(0)
call s:LogDebugMessage('AutoUpdate finished successfully')
endfunction
@@ -3045,6 +3046,11 @@ function! s:EscapeCtagsCmd(ctags_bin, args, ...)
let ctags_cmd = shellescape(a:ctags_bin) . ' ' . a:args . ' ' . fname
+ " Stupid cmd.exe quoting
+ if &shell =~ 'cmd\.exe'
+ let ctags_cmd = substitute(ctags_cmd, '\(&\|\^\)', '^\0', 'g')
+ endif
+
if exists('+shellslash')
let &shellslash = shellslash_save
endif
View
1  vim/bundle/tagbar/doc/tagbar.txt
@@ -1102,6 +1102,7 @@ The folding technique was inspired by NERDTree by Martin Grenfell.
Thanks to the following people for code contributions, feature suggestions etc:
Jan Christoph Ebersbach
+Vadim Fint
Leandro Freitas
Seth Milliken
Kien N
View
30 vim/bundle/vim-coffee-script/Readme.md
@@ -2,7 +2,7 @@ This project adds [CoffeeScript] support to the vim editor. It handles syntax,
indenting, compiling, and more. Also included is an [eco] syntax and support for
CoffeeScript in Haml and HTML.
-![Screenshot](http://i.imgur.com/BV29H.png)
+![Screenshot](http://i.imgur.com/eUBvm.png)
[CoffeeScript]: http://jashkenas.github.com/coffee-script/
[eco]: https://github.com/sstephenson/eco
@@ -63,11 +63,7 @@ directory and updates are just a `git pull` away.
The `CoffeeMake` command compiles the current file and parses any errors:
- ![CoffeeMake](http://i.imgur.com/OKRKE.png)
-
- ![CoffeeMake](http://i.imgur.com/PQ6ed.png)
-
- ![CoffeeMake](http://i.imgur.com/Jp6NI.png)
+ ![CoffeeMake](http://i.imgur.com/cr9xI.png)
The full signature of the command is:
@@ -135,16 +131,14 @@ CoffeeScript is compiled to JavaScript. The full signature of the command is:
Calling `CoffeeCompile` without a range compiles the whole file:
- ![CoffeeCompile](http://i.imgur.com/pTesp.png)
-
- ![Compiled](http://i.imgur.com/81QMf.png)
+ ![CoffeeCompile](http://i.imgur.com/KJfSZ.png)
Calling `CoffeeCompile` with a range, like in visual mode, compiles the selected
snippet of CoffeeScript:
- ![CoffeeCompile Snippet](http://i.imgur.com/Rm7iu.png)
+ ![CoffeeCompile Snippet](http://i.imgur.com/mbaUA.png)
- ![Compiled Snippet](http://i.imgur.com/KmrG8.png)
+ ![Compiled Snippet](http://i.imgur.com/Ocjuc.png)
This scratch buffer can be quickly closed by hitting the `q` key.
@@ -166,9 +160,9 @@ The initial size of the CoffeeCompile buffer can be given as a number:
Watch mode is like the Try CoffeeScript preview box on the CoffeeScript
homepage:
- ![Watch Mode](http://i.imgur.com/wIN6h.png)
- ![Watch Mode](http://i.imgur.com/GgdCo.png)
- ![Watch Mode](http://i.imgur.com/QdpAP.png)
+ ![Watch Mode](http://i.imgur.com/M6l1j.png)
+
+ ![Watch Mode](http://i.imgur.com/qtNmU.png)
Writing some code and then exiting insert mode automatically updates the
compiled JavaScript buffer.
@@ -199,7 +193,7 @@ The `CoffeeLint` command runs [coffeelint](http://www.coffeelint.org/) (version
Use it like `CoffeeMake`.
- :CoffeeLint! | cwindow
+ ![CoffeeLint](http://i.imgur.com/dlxF7.png)
#### Default coffeelint options
@@ -221,9 +215,9 @@ This option is set to `coffeelint` by default.
The `CoffeeRun` command compiles the current file or selected snippet and runs
the resulting JavaScript. Output is shown at the bottom of the screen:
- ![CoffeeRun](http://i.imgur.com/d4yXC.png)
+ ![CoffeeRun](http://i.imgur.com/7hwSy.png)
- ![CoffeeRun Output](http://i.imgur.com/m6UID.png)
+ ![CoffeeRun Output](http://i.imgur.com/WNWvC.png)
### Configure Syntax Highlighting
@@ -258,7 +252,7 @@ Changing these core settings can make vim more CoffeeScript friendly.
Folding by indentation works well for CoffeeScript functions and classes:
- ![Folding](http://i.imgur.com/lpDWo.png)
+ ![Folding](http://i.imgur.com/Y0rDC.png)
To fold by indentation in CoffeeScript files, add this line to your `vimrc`:
View
3  vim/bundle/vim-coffee-script/ftdetect/coffee.vim
@@ -5,7 +5,8 @@
autocmd BufNewFile,BufRead *.coffee set filetype=coffee
autocmd BufNewFile,BufRead *Cakefile set filetype=coffee
-autocmd BufNewFile,BufRead *.coffeekup set filetype=coffee
+autocmd BufNewFile,BufRead *.coffeekup,*.ck set filetype=coffee
+autocmd BufNewFile,BufRead *.ck set filetype=coffee
function! s:DetectCoffee()
if getline(1) =~ '^#!.*\<coffee\>'
View
31 vim/bundle/vim-coffee-script/syntax/coffee.vim
@@ -45,7 +45,7 @@ syn match coffeeOperator /\<\%(instanceof\|typeof\|delete\)\>/ display
hi def link coffeeOperator Operator
" The first case matches symbol operators only if they have an operand before.
-syn match coffeeExtendedOp /\%(\S\s*\)\@<=[+\-*/%&|\^=!<>?.]\+\|[-=]>\|--\|++\|:/
+syn match coffeeExtendedOp /\%(\S\s*\)\@<=[+\-*/%&|\^=!<>?.]\{-1,}\|[-=]>\|--\|++\|:/
\ display
syn match coffeeExtendedOp /\<\%(and\|or\)=/ display
hi def link coffeeExtendedOp coffeeOperator
@@ -63,10 +63,12 @@ hi def link coffeeGlobal Type
" A special variable
syn match coffeeSpecialVar /\<\%(this\|prototype\|arguments\)\>/ display
-" An @-variable
-syn match coffeeSpecialVar /@\%(\I\i*\)\?/ display
hi def link coffeeSpecialVar Special
+" An @-variable
+syn match coffeeSpecialIdent /@\%(\I\i*\)\?/ display
+hi def link coffeeSpecialIdent Identifier
+
" A class-like name that starts with a capital letter
syn match coffeeObject /\<\u\w*\>/ display
hi def link coffeeObject Structure
@@ -76,8 +78,8 @@ syn match coffeeConstant /\<\u[A-Z0-9_]\+\>/ display
hi def link coffeeConstant Constant
" A variable name
-syn cluster coffeeIdentifier contains=coffeeSpecialVar,coffeeObject,
-\ coffeeConstant
+syn cluster coffeeIdentifier contains=coffeeSpecialVar,coffeeSpecialIdent,
+\ coffeeObject,coffeeConstant
" A non-interpolated string
syn cluster coffeeBasicString contains=@Spell,coffeeEscape
@@ -106,7 +108,7 @@ hi def link coffeeFloat Float
" An error for reserved keywords
if !exists("coffee_no_reserved_words_error")
- syn match coffeeReservedError /\<\%(case\|default\|function\|var\|void\|with\|const\|let\|enum\|export\|import\|native\|__hasProp\|__extends\|__slice\|__bind\|__indexOf\)\>/
+ syn match coffeeReservedError /\<\%(case\|default\|function\|var\|void\|with\|const\|let\|enum\|export\|import\|native\|__hasProp\|__extends\|__slice\|__bind\|__indexOf\|implements\|interface\|let\|package\|private\|protected\|public\|static\|yield\)\>/
\ display
hi def link coffeeReservedError Error
endif
@@ -204,14 +206,15 @@ hi def link coffeeParen coffeeBlock
syn cluster coffeeAll contains=coffeeStatement,coffeeRepeat,coffeeConditional,
\ coffeeException,coffeeKeyword,coffeeOperator,
\ coffeeExtendedOp,coffeeSpecialOp,coffeeBoolean,
-\ coffeeGlobal,coffeeSpecialVar,coffeeObject,
-\ coffeeConstant,coffeeString,coffeeNumber,
-\ coffeeFloat,coffeeReservedError,coffeeObjAssign,
-\ coffeeComment,coffeeBlockComment,coffeeEmbed,
-\ coffeeRegex,coffeeHeregex,coffeeHeredoc,
-\ coffeeSpaceError,coffeeSemicolonError,
-\ coffeeDotAccess,coffeeProtoAccess,
-\ coffeeCurlies,coffeeBrackets,coffeeParens
+\ coffeeGlobal,coffeeSpecialVar,coffeeSpecialIdent,
+\ coffeeObject,coffeeConstant,coffeeString,
+\ coffeeNumber,coffeeFloat,coffeeReservedError,
+\ coffeeObjAssign,coffeeComment,coffeeBlockComment,
+\ coffeeEmbed,coffeeRegex,coffeeHeregex,
+\ coffeeHeredoc,coffeeSpaceError,
+\ coffeeSemicolonError,coffeeDotAccess,
+\ coffeeProtoAccess,coffeeCurlies,coffeeBrackets,
+\ coffeeParens
if !exists('b:current_syntax')
let b:current_syntax = 'coffee'
View
2  vim/bundle/vim-haml/ftdetect/haml.vim
@@ -1,3 +1,3 @@
-autocmd BufNewFile,BufRead *.haml setf haml
+autocmd BufNewFile,BufRead *.haml,*.hamlbars setf haml
autocmd BufNewFile,BufRead *.sass setf sass
autocmd BufNewFile,BufRead *.scss setf scss
View
6 vim/bundle/vim-haml/syntax/sass.vim
@@ -43,6 +43,10 @@ syn match sassMixing "^\s\+\zs+" nextgroup=sassMixinName
syn match sassMixing "\%([{};]\s*\|^\s*\)\@<=@include" nextgroup=sassMixinName skipwhite
syn match sassExtend "\%([{};]\s*\|^\s*\)\@<=@extend"
+syn match sassFunctionName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute
+syn match sassFunctionDecl "\%([{};]\s*\|^\s*\)\@<=@function" nextgroup=sassFunctionName skipwhite
+syn match sassReturn "\%([{};]\s*\|^\s*\)\@<=@return"
+
syn match sassEscape "^\s*\zs\\"
syn match sassIdChar "#[[:alnum:]_-]\@=" nextgroup=sassId
syn match sassId "[[:alnum:]_-]\+" contained
@@ -71,6 +75,8 @@ hi def link sassFunction Function
hi def link sassMixing PreProc
hi def link sassMixin PreProc
hi def link sassExtend PreProc
+hi def link sassFunctionDecl PreProc
+hi def link sassReturn PreProc
hi def link sassTodo Todo
hi def link sassInclude Include
hi def link sassDebug sassControl
View
9 vim/bundle/vim-indent-guides/doc/indent_guides.txt
@@ -156,14 +156,14 @@ Default: 0. Values: 0 or 1.
The default mapping for toggling indent guides is <Leader>ig. You can easily
map it to other keys. For example:
>
- :nmap <Leader>ig :IndentGuidesToggle<CR>
+ :nmap <silent> <Leader>ig <Plug>IndentGuidesToggle
<
You can also map some other commands that are not mapped by default. For
example:
>
- :nmap <Leader>ie :IndentGuidesEnable<CR>
- :nmap <Leader>id :IndentGuidesDisable<CR>
+ :nmap <silent> <Leader>ie <Plug>IndentGuidesEnable
+ :nmap <silent> <Leader>id <Plug>IndentGuidesDisable
<
==============================================================================
@@ -226,6 +226,9 @@ Bug reports, feedback, suggestions etc are welcomed.
==============================================================================
7. CHANGELOG *indent-guides-changelog*
+1.7 (pending release)~
+ * Added way to override the default mapping (thanks xuhdev).
+
1.6~
* Added option g:|indent_guides_space_guides| to control whether spaces are
considered as indention (thanks scoz).
View
9 vim/bundle/vim-indent-guides/plugin/indent_guides.vim
@@ -55,7 +55,14 @@ call s:InitVariable('g:indent_guides_debug', 0 )
call s:InitVariable('g:indent_guides_space_guides', 1 )
" Default mapping
-nmap <Leader>ig :IndentGuidesToggle<CR>
+if !hasmapto('<Plug>IndentGuidesToggle', 'n') && maparg('<Leader>ig', 'n') == ''
+ nmap <silent><unique> <Leader>ig <Plug>IndentGuidesToggle
+endif
+
+" Plug mappings
+nnoremap <unique><script> <Plug>IndentGuidesToggle :IndentGuidesToggle<CR>
+nnoremap <unique><script> <Plug>IndentGuidesEnable :IndentGuidesEnable<CR>
+nnoremap <unique><script> <Plug>IndentGuidesDisable :IndentGuidesDisable<CR>
" Auto commands
augroup indent_guides
View
33 vim/bundle/vim-powerline/autoload/Pl/Parser.vim
@@ -318,14 +318,35 @@ function! s:AddDivider(text, side, mode, colors, prev, curr, next) " {{{
let div_type = s:HARD_DIVIDER
" Create new highlighting group
- " Use FG = CURRENT BG, BG = CMP BG
- let div_colors['ctermfg'] = get(div_colors, 'ctermbg')
- let div_colors['guifg'] = get(div_colors, 'guibg')
+ if div_colors['attr'] =~ 'reverse' && cmp_colors['attr'] =~ 'reverse'
+ " Use FG = CURRENT FG, BG = CMP FG
+ let div_colors['ctermbg'] = get(cmp_colors, 'ctermfg')
+ let div_colors['guibg'] = get(cmp_colors, 'guifg')
- let div_colors['ctermbg'] = get(cmp_colors, 'ctermbg')
- let div_colors['guibg'] = get(cmp_colors, 'guibg')
+ let div_colors['attr'] = div_colors['attr'] =~ 'bold' ? 'bold' : 'NONE'
+ elseif div_colors['attr'] =~ 'reverse'
+ " Use FG = CURRENT FG, BG = CMP BG
+ let div_colors['ctermbg'] = get(cmp_colors, 'ctermbg')
+ let div_colors['guibg'] = get(cmp_colors, 'guibg')
- let div_colors['attr'] = 'NONE'
+ let div_colors['attr'] = div_colors['attr'] =~ 'bold' ? 'bold' : 'NONE'
+ elseif cmp_colors['attr'] =~ 'reverse'
+ " Use FG = CMP FG, BG = CURRENT BG : reversed
+ let div_colors['ctermfg'] = get(cmp_colors, 'ctermfg')
+ let div_colors['guifg'] = get(cmp_colors, 'guifg')
+
+ let div_colors['attr'] = 'reverse'
+
+ else
+ " Use FG = CURRENT BG, BG = CMP BG
+ let div_colors['ctermfg'] = get(div_colors, 'ctermbg')
+ let div_colors['guifg'] = get(div_colors, 'guibg')
+
+ let div_colors['ctermbg'] = get(cmp_colors, 'ctermbg')
+ let div_colors['guibg'] = get(cmp_colors, 'guibg')
+
+ let div_colors['attr'] = 'NONE'
+ endif
endif
endif
View
4 vim/bundle/vim-powerline/autoload/Powerline/Colorschemes/default.vim
@@ -66,7 +66,7 @@ let g:Powerline#Colorschemes#default#colorscheme = Pl#Colorscheme#Init([
\ 'i': ['white', 'darkblue', ['bold']],
\ }),
\
- \ Pl#Hi#Segments(['fileinfo.filepath'], {
+ \ Pl#Hi#Segments(['fileinfo.filepath', 'status'], {
\ 'n': ['gray10'],
\ 'N': ['gray5'],
\ 'i': ['mediumcyan'],
@@ -84,7 +84,7 @@ let g:Powerline#Colorschemes#default#colorscheme = Pl#Colorscheme#Init([
\ 'i': ['brightestred', ['bold']],
\ }),
\
- \ Pl#Hi#Segments(['current_function', 'fileformat', 'fileencoding', 'pwd', 'filetype', 'rvm:string', 'rvm:statusline', 'virtualenv:statusline', 'charcode', 'currhigroup'], {
+ \ Pl#Hi#Segments(['currenttag', 'fileformat', 'fileencoding', 'pwd', 'filetype', 'rvm:string', 'rvm:statusline', 'virtualenv:statusline', 'charcode', 'currhigroup'], {
\ 'n': ['gray8', 'gray2'],
\ 'i': ['mediumcyan', 'darkestblue'],
\ }),
View
192 vim/bundle/vim-powerline/autoload/Powerline/Colorschemes/skwp.vim
@@ -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', '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
25 vim/bundle/vim-powerline/autoload/Powerline/Functions.vim
@@ -2,14 +2,17 @@
autocmd CursorHold,BufWritePost,InsertLeave * unlet! b:statusline_trailing_space_warning
function! Powerline#Functions#GetFilepath() " {{{
- let relpath = expand('%')
+ if exists('b:Powerline_filepath')
+ return b:Powerline_filepath
+ endif
+
+ let dirsep = has('win32') && ! &shellslash ? '\' : '/'
+ let filepath = expand('%')
- if empty(relpath)
+ if empty(filepath)
return ''
endif
- let headpath = substitute(expand('%:h'), escape($HOME, '\'), '~', '')
- let fullpath = substitute(expand('%:p:h'), escape($HOME, '\'), '~', '')
let ret = ''
if g:Powerline_stl_path_style == 'short'
@@ -17,21 +20,25 @@ function! Powerline#Functions#GetFilepath() " {{{
" 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"
- let fpath = split(headpath, '/')
+ "
+ " This displays the shortest possible path, relative to ~ or the
+ " current directory.
+ let fpath = split(fnamemodify(filepath, ':~:.:h'), dirsep)
let fpath_shortparts = map(fpath[1:], 'v:val[0]')
- let ret = join(extend([fpath[0]], fpath_shortparts), '/') .'/'
+ 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 = headpath .'/'
+ 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 = fullpath .'/'
+ let ret = filepath . dirsep
endif
- if ret == './'
+ if ret == ('.'. dirsep)
return ''
endif
+ let b:Powerline_filepath = ret
return ret
endfunction " }}}
function! Powerline#Functions#GetShortPath(threshold) " {{{
View
8 vim/bundle/vim-powerline/autoload/Powerline/Functions/aurum.vim
@@ -0,0 +1,8 @@
+function! Powerline#Functions#aurum#GetBranch(symbol) " {{{
+ let r = aurum#branch()
+ return empty(r) ? '' : a:symbol .' '. r
+endfunction " }}}
+function! Powerline#Functions#aurum#GetStatus() " {{{
+ let r = aurum#status()
+ return (empty(r) || r is# 'clean') ? '' : toupper(r[0])
+endfunction " }}}
View
3  vim/bundle/vim-powerline/autoload/Powerline/Functions/cfi.vim
@@ -1,3 +0,0 @@
-function! Powerline#Functions#cfi#GetCurrentFunction() " {{{
- return cfi#format('%s', '')
-endfunction " }}}
View
17 vim/bundle/vim-powerline/autoload/Powerline/Functions/hgrev.vim
@@ -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
2  vim/bundle/vim-powerline/autoload/Powerline/Matches.vim
@@ -1,6 +1,6 @@
let g:Powerline#Matches#matches = {
\ 'command_t' : Pl#Match#Add('bufname("%")', 'GoToFile'),
- \ 'ft_help' : Pl#Match#Add('&ft' , 'help'),
+ \ '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'),
View
2  vim/bundle/vim-powerline/autoload/Powerline/Segments.vim
@@ -22,7 +22,7 @@ let g:Powerline#Segments#segments = Pl#Segment#Init([
\ Pl#Segment#Create('scrollpercent' , '%3p%%'),
\ Pl#Segment#Create('lineinfo',
\ Pl#Segment#Create('line.cur' , '$LINE %3l'),
- \ Pl#Segment#Create('line.tot' , ':%-2c', Pl#Segment#NoPadding()),
+ \ 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')),
View
6 vim/bundle/vim-powerline/autoload/Powerline/Segments/aurum.vim
@@ -0,0 +1,6 @@
+let g:Powerline#Segments#aurum#segments = Pl#Segment#Init(['aurum',
+ \ (exists('*FraworLoad') && FraworLoad('autoload/aurum')),
+ \
+ \ Pl#Segment#Create('branch', '%{Powerline#Functions#aurum#GetBranch("$BRANCH")}'),
+ \ Pl#Segment#Create('status', '%{Powerline#Functions#aurum#GetStatus()}')