Skip to content

Commit 351979d

Browse files
author
amix
committed
Updated plugins
1 parent a448b32 commit 351979d

File tree

20 files changed

+548
-615
lines changed

20 files changed

+548
-615
lines changed

sources_non_forked/ctrlp.vim/autoload/ctrlp.vim

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ fu! s:match_window_opts()
259259
\ s:mw =~ 'min:[^,]\+' ? str2nr(matchstr(s:mw, 'min:\zs\d\+')) : 1
260260
let [s:mw_max, s:mw_min] = [max([s:mw_max, 1]), max([s:mw_min, 1])]
261261
let s:mw_min = min([s:mw_min, s:mw_max])
262+
let s:mw_res =
263+
\ s:mw =~ 'results:[^,]\+' ? str2nr(matchstr(s:mw, 'results:\zs\d\+'))
264+
\ : min([s:mw_max, &lines])
265+
let s:mw_res = max([s:mw_res, 1])
262266
endf
263267
"}}}1
264268
" * Open & Close {{{1
@@ -576,7 +580,7 @@ fu! s:Update(str)
576580
let s:martcs = &scs && str =~ '\u' ? '\C' : ''
577581
let pat = s:matcher == {} ? s:SplitPattern(str) : str
578582
let lines = s:nolim == 1 && empty(str) ? copy(g:ctrlp_lines)
579-
\ : s:MatchedItems(g:ctrlp_lines, pat, s:winmaxh)
583+
\ : s:MatchedItems(g:ctrlp_lines, pat, s:mw_res)
580584
cal s:Render(lines, pat)
581585
endf
582586

@@ -1605,8 +1609,7 @@ endf
16051609
fu! ctrlp#syntax()
16061610
if ctrlp#nosy() | retu | en
16071611
for [ke, va] in items(s:hlgrps) | cal ctrlp#hicheck('CtrlP'.ke, va) | endfo
1608-
if !hlexists('CtrlPLinePre')
1609-
\ && synIDattr(synIDtrans(hlID('Normal')), 'bg') !~ '^-1$\|^$'
1612+
if synIDattr(synIDtrans(hlID('Normal')), 'bg') !~ '^-1$\|^$'
16101613
sil! exe 'hi CtrlPLinePre '.( has("gui_running") ? 'gui' : 'cterm' ).'fg=bg'
16111614
en
16121615
sy match CtrlPNoEntries '^ == NO ENTRIES ==$'

sources_non_forked/ctrlp.vim/autoload/ctrlp/bookmarkdir.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ fu! ctrlp#bookmarkdir#accept(mode, str)
112112
en
113113
endf
114114

115-
fu! ctrlp#bookmarkdir#add(dir)
115+
fu! ctrlp#bookmarkdir#add(dir, ...)
116116
let str = 'Directory to bookmark: '
117117
let cwd = a:dir != '' ? a:dir : s:getinput(str, getcwd(), 'dir')
118118
if cwd == '' | retu | en
119119
let cwd = fnamemodify(cwd, ':p')
120-
let name = s:getinput('Bookmark as: ', cwd)
120+
let name = a:0 && a:1 != '' ? a:1 : s:getinput('Bookmark as: ', cwd)
121121
if name == '' | retu | en
122122
let name = tr(name, '', ' ')
123123
cal s:savebookmark(name, cwd)

sources_non_forked/ctrlp.vim/autoload/ctrlp/buffertag.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ let s:types = {
6262
\ 'lisp' : '%slisp%slisp%sf',
6363
\ 'lua' : '%slua%slua%sf',
6464
\ 'make' : '%smake%smake%sm',
65+
\ 'ocaml' : '%socaml%socaml%scmMvtfCre',
6566
\ 'pascal' : '%spascal%spascal%sfp',
6667
\ 'perl' : '%sperl%sperl%sclps',
6768
\ 'php' : '%sphp%sphp%scdvf',

sources_non_forked/ctrlp.vim/autoload/ctrlp/tag.vim

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,36 @@ cal add(g:ctrlp_ext_vars, {
2222
let s:id = g:ctrlp_builtins + len(g:ctrlp_ext_vars)
2323
" Utilities {{{1
2424
fu! s:findcount(str)
25-
let [tg, fname] = split(a:str, '\t\+\ze[^\t]\+$')
25+
let [tg, ofname] = split(a:str, '\t\+\ze[^\t]\+$')
2626
let tgs = taglist('^'.tg.'$')
2727
if len(tgs) < 2
28-
retu [1, 1]
28+
retu [0, 0, 0, 0]
2929
en
3030
let bname = fnamemodify(bufname('%'), ':p')
31-
let fname = expand(fnamemodify(simplify(fname), ':s?^[.\/]\+??:p:.'), 1)
32-
let [fnd, ct, pos, idx] = [0, 0, 0, 0]
33-
wh idx < len(tgs)
34-
if bname == fnamemodify(tgs[idx]["filename"], ':p')
35-
cal insert(tgs, remove(tgs, idx))
36-
brea
37-
en
38-
let idx += 1
39-
endw
40-
for each in tgs
41-
let ct += 1
42-
let fulname = fnamemodify(each["filename"], ':p')
31+
let fname = expand(fnamemodify(simplify(ofname), ':s?^[.\/]\+??:p:.'), 1)
32+
let [fnd, cnt, pos, ctgs, otgs] = [0, 0, 0, [], []]
33+
for tgi in tgs
34+
let lst = bname == fnamemodify(tgi["filename"], ':p') ? 'ctgs' : 'otgs'
35+
cal call('add', [{lst}, tgi])
36+
endfo
37+
let ntgs = ctgs + otgs
38+
for tgi in ntgs
39+
let cnt += 1
40+
let fulname = fnamemodify(tgi["filename"], ':p')
4341
if stridx(fulname, fname) >= 0
4442
\ && strlen(fname) + stridx(fulname, fname) == strlen(fulname)
4543
let fnd += 1
46-
let pos = ct
44+
let pos = cnt
4745
en
48-
if fnd > 1 | brea | en
4946
endfo
50-
retu [fnd, pos]
47+
let cnt = 0
48+
for tgi in ntgs
49+
let cnt += 1
50+
if tgi["filename"] == ofname
51+
let [fnd, pos] = [0, cnt]
52+
en
53+
endfo
54+
retu [1, fnd, pos, len(ctgs)]
5155
endf
5256

5357
fu! s:filter(tags)
@@ -89,27 +93,33 @@ endf
8993
fu! ctrlp#tag#accept(mode, str)
9094
cal ctrlp#exit()
9195
let str = matchstr(a:str, '^[^\t]\+\t\+[^\t]\+\ze\t')
92-
let [tg, fnd] = [split(str, '^[^\t]\+\zs\t')[0], s:findcount(str)]
96+
let [tg, fdcnt] = [split(str, '^[^\t]\+\zs\t')[0], s:findcount(str)]
9397
let cmds = {
9498
\ 't': ['tab sp', 'tab stj'],
9599
\ 'h': ['sp', 'stj'],
96100
\ 'v': ['vs', 'vert stj'],
97101
\ 'e': ['', 'tj'],
98102
\ }
99-
let cmd = fnd[0] == 1 ? cmds[a:mode][0] : cmds[a:mode][1]
103+
let utg = fdcnt[3] < 2 && fdcnt[0] == 1 && fdcnt[1] == 1
104+
let cmd = !fdcnt[0] || utg ? cmds[a:mode][0] : cmds[a:mode][1]
100105
let cmd = a:mode == 'e' && ctrlp#modfilecond(!&aw)
101106
\ ? ( cmd == 'tj' ? 'stj' : 'sp' ) : cmd
102107
let cmd = a:mode == 't' ? ctrlp#tabcount().cmd : cmd
103-
if fnd[0] == 1
108+
if !fdcnt[0] || utg
104109
if cmd != ''
105110
exe cmd
106111
en
107112
let save_cst = &cst
108113
set cst&
109-
cal feedkeys(":".fnd[1]."ta ".tg."\r", 'nt')
114+
cal feedkeys(":".( utg ? fdcnt[2] : "" )."ta ".tg."\r", 'nt')
110115
let &cst = save_cst
111116
el
112-
cal feedkeys(":".cmd." ".tg."\r", 'nt')
117+
let ext = ""
118+
if fdcnt[1] < 2 && fdcnt[2]
119+
let [sav_more, &more] = [&more, 0]
120+
let ext = fdcnt[2]."\r".":let &more = ".sav_more."\r"
121+
en
122+
cal feedkeys(":".cmd." ".tg."\r".ext, 'nt')
113123
en
114124
cal ctrlp#setlcdir()
115125
endf

sources_non_forked/ctrlp.vim/doc/ctrlp.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ heights of the match window: >
123123
let g:ctrlp_match_window = ''
124124
<
125125
Example: >
126-
let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:10'
126+
let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:10,results:10'
127127
<
128128
The position: (default: bottom)
129129
top - show the match window at the top of the screen.
@@ -137,6 +137,9 @@ The minimum and maximum heights:
137137
min:{n} - show minimum {n} lines (default: 1).
138138
max:{n} - show maximum {n} lines (default: 10).
139139

140+
The maximum number of results:
141+
results:{n} - list maximum {n} results (default: sync with max height).
142+
140143
Note: When a setting isn't set, its default value will be used.
141144

142145
*'g:ctrlp_switch_buffer'*
@@ -1285,6 +1288,8 @@ Special thanks:~
12851288
* Christopher Fredén <github.com/icetan>
12861289
* Zahary Karadjov <github.com/zah>
12871290
* Jo De Boeck <github.com/grimpy>
1291+
* Rudi Grinberg <github.com/rgrinberg>
1292+
* Timothy Mellor <github.com/mellort>
12881293

12891294
===============================================================================
12901295
CHANGELOG *ctrlp-changelog*

sources_non_forked/vim-snipmate/Contributors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ additional contributions from:
3030
* [radicalbit](https://github.com/radicalbit)
3131
* [redpill](https://github.com/redpill)
3232
* [robhudson](https://github.com/robhudson)
33+
* [Shraymonks](https://github.com/shraymonks)
3334
* [sickill](https://github.com/sickill)
3435
* [statik](https://github.com/statik)
3536
* [steveno](https://github.com/steveno)

sources_non_forked/vim-snipmate/addon-info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"vim-addon-mw-utils": {},
99
"tlib": {}
1010
},
11-
"description" : "snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim. See README.markdown to learn about the features this fork adds"
11+
"description" : "snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim. See README.md to learn about the features this fork adds"
1212
}

sources_non_forked/vim-snipmate/autoload/snipMate.vim

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let s:c = g:snipMate
77
try
88
call tlib#input#List('mi', '', [])
99
catch /.*/
10-
echoe "you're missing tlib. See install instructions at ".expand('<sfile>:h:h').'/README.rst'
10+
echoe "you're missing tlib. See install instructions at ".expand('<sfile>:h:h').'/README.md'
1111
endtry
1212

1313
" match $ which doesn't follow a \
@@ -121,8 +121,9 @@ endfunction
121121
fun! s:ProcessSnippet(snip)
122122
let snippet = a:snip
123123

124-
if exists('g:snipmate_content_visual')
125-
let visual = g:snipmate_content_visual | unlet g:snipmate_content_visual
124+
if exists('b:snipmate_content_visual')
125+
let visual = b:snipmate_content_visual
126+
unlet b:snipmate_content_visual
126127
else
127128
let visual = ''
128129
endif
@@ -167,6 +168,18 @@ fun! s:ProcessSnippet(snip)
167168
let i += 1
168169
endw
169170

171+
" Add ${0} tab stop if found
172+
if snippet =~ s:d . '{0'
173+
let snippet = substitute(snippet, s:d.'{0', '${'.i, '')
174+
let s = matchstr(snippet, s:d.'{'.i.':\zs.\{-}\ze}')
175+
if s != ''
176+
let snippet = substitute(snippet, s:d.'0', '$'.i, 'g')
177+
let snippet = substitute(snippet, s:d.i, s.'&', 'g')
178+
endif
179+
else
180+
let snippet .= '${'.i.'}'
181+
endif
182+
170183
if &et " Expand tabs to spaces if 'expandtab' is set.
171184
return substitute(snippet, '\t', repeat(' ', &sts ? &sts : &sw), 'g')
172185
endif

0 commit comments

Comments
 (0)