mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -93,6 +93,7 @@ let [s:pref, s:bpref, s:opts, s:new_opts, s:lc_opts] =
|
||||
\ 'open_single_match': ['s:opensingle', []],
|
||||
\ 'brief_prompt': ['s:brfprt', 0],
|
||||
\ 'match_current_file': ['s:matchcrfile', 0],
|
||||
\ 'match_natural_name': ['s:matchnatural', 0],
|
||||
\ 'compare_lim': ['s:compare_lim', 3000],
|
||||
\ 'bufname_mod': ['s:bufname_mod', ':t'],
|
||||
\ 'bufpath_mod': ['s:bufpath_mod', ':~:.:h'],
|
||||
@ -425,7 +426,7 @@ fu! s:UserCmd(lscmd)
|
||||
let do_ign =
|
||||
\ type(s:usrcmd) == 4 && has_key(s:usrcmd, 'ignore') && s:usrcmd['ignore']
|
||||
if do_ign && ctrlp#igncwd(s:cwd) | retu | en
|
||||
if exists('+ssl') && &ssl
|
||||
if exists('+ssl') && &ssl && &shell !~ 'sh'
|
||||
let [ssl, &ssl, path] = [&ssl, 0, tr(path, '/', '\')]
|
||||
en
|
||||
if (has('win32') || has('win64')) && match(&shellcmdflag, "/") != -1
|
||||
@ -653,9 +654,9 @@ fu! s:Update(str)
|
||||
endf
|
||||
|
||||
fu! s:ForceUpdate()
|
||||
let wv = winsaveview()
|
||||
let pos = exists('*getcurpos') ? getcurpos() : getpos('.')
|
||||
sil! cal s:Update(escape(s:getinput(), '\'))
|
||||
cal winrestview(wv)
|
||||
cal setpos('.', pos)
|
||||
endf
|
||||
|
||||
fu! s:BuildPrompt(upd)
|
||||
@ -839,9 +840,9 @@ fu! s:PrtSelectMove(dir)
|
||||
let wht = winheight(0)
|
||||
let dirs = {'t': 'gg','b': 'G','j': 'j','k': 'k','u': wht.'k','d': wht.'j'}
|
||||
exe 'keepj norm!' dirs[a:dir]
|
||||
let wv = winsaveview()
|
||||
let pos = exists('*getcurpos') ? getcurpos() : getpos('.')
|
||||
cal s:BuildPrompt(0)
|
||||
cal winrestview(wv)
|
||||
cal setpos('.', pos)
|
||||
endf
|
||||
|
||||
fu! s:PrtSelectJump(char)
|
||||
@ -864,9 +865,9 @@ fu! s:PrtSelectJump(char)
|
||||
let [jmpln, s:jmpchr] = [npos == -1 ? pos : npos, [chr, npos]]
|
||||
en
|
||||
exe 'keepj norm!' ( jmpln + 1 ).'G'
|
||||
let wv = winsaveview()
|
||||
let pos = exists('*getcurpos') ? getcurpos() : getpos('.')
|
||||
cal s:BuildPrompt(0)
|
||||
cal winrestview(wv)
|
||||
cal setpos('.', pos)
|
||||
en
|
||||
endf
|
||||
" Misc {{{2
|
||||
@ -907,6 +908,7 @@ fu! s:PrtDeleteMRU()
|
||||
endf
|
||||
|
||||
fu! s:PrtExit()
|
||||
exe bufwinnr(s:bufnr).'winc w'
|
||||
if bufnr('%') == s:bufnr && bufname('%') == 'ControlP'
|
||||
noa cal s:Close(1)
|
||||
noa winc p
|
||||
@ -1822,7 +1824,7 @@ fu! s:highlight(pat, grp)
|
||||
" occurrence of our letters. We also ensure that our matcher is case
|
||||
" insensitive or sensitive depending.
|
||||
cal matchadd(a:grp, beginning.middle.ending)
|
||||
endfor
|
||||
endfo
|
||||
en
|
||||
|
||||
cal matchadd('CtrlPLinePre', '^>')
|
||||
@ -2346,9 +2348,16 @@ 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
|
||||
if s:matchnatural == 1
|
||||
for item in range(1, len(a:lst) - 1)
|
||||
let c = a:lst[item - 1]
|
||||
let pat .= (c == '/' ? '[^/]\{-}' : '[^'.c.'/]\{-}').a:lst[item]
|
||||
endfo
|
||||
else
|
||||
for item in range(1, len(a:lst) - 1)
|
||||
let pat .= '[^'.a:lst[item - 1].']\{-}'.a:lst[item]
|
||||
endfo
|
||||
en
|
||||
retu pat
|
||||
endf
|
||||
|
||||
|
Reference in New Issue
Block a user