Add :CtrlPDir autocomplete
This commit is contained in:
parent
b1665b2c38
commit
9e88a8c0fc
@ -1332,13 +1332,11 @@ fu! ctrlp#init(type, ...)
|
||||
if exists('s:init') | retu | en
|
||||
let [s:matches, s:init] = [1, 1]
|
||||
cal s:Open()
|
||||
cal s:SetWD(exists('a:1') ? a:1 : '')
|
||||
cal s:SetWD(a:0 == 1 ? a:1 : '')
|
||||
cal s:MapKeys()
|
||||
cal s:SetLines(a:type)
|
||||
cal s:BuildPrompt(1)
|
||||
if has('syntax') && exists('g:syntax_on')
|
||||
cal s:syntax()
|
||||
en
|
||||
if has('syntax') && exists('g:syntax_on') | cal s:syntax() | en
|
||||
endf
|
||||
if has('autocmd') "{{{1
|
||||
aug CtrlPAug
|
||||
|
@ -13,7 +13,7 @@ let [g:loaded_ctrlp, g:ctrlp_lines, g:ctrlp_allfiles] = [1, [], []]
|
||||
if !exists('g:ctrlp_map') | let g:ctrlp_map = '<c-p>' | en
|
||||
if !exists('g:ctrlp_cmd') | let g:ctrlp_cmd = 'CtrlP' | en
|
||||
|
||||
com! -na=? -comp=custom,ctrlp#cpl CtrlP cal ctrlp#init(0, <q-args>)
|
||||
com! -n=? -com=custom,ctrlp#cpl CtrlP cal ctrlp#init(0, <q-args>)
|
||||
|
||||
com! CtrlPBuffer cal ctrlp#init(1)
|
||||
com! CtrlPMRUFiles cal ctrlp#init(2)
|
||||
@ -41,7 +41,9 @@ if index(g:ctrlp_extensions, 'quickfix') >= 0
|
||||
en
|
||||
|
||||
if index(g:ctrlp_extensions, 'dir') >= 0
|
||||
let g:ctrlp_alldirs = [] | com! CtrlPDir cal ctrlp#init(ctrlp#dir#id())
|
||||
let g:ctrlp_alldirs = []
|
||||
com! -n=? -com=custom,ctrlp#cpl CtrlPDir
|
||||
\ cal ctrlp#init(ctrlp#dir#id(), <q-args>)
|
||||
en
|
||||
|
||||
if index(g:ctrlp_extensions, 'buffertag') >= 0
|
||||
|
Loading…
Reference in New Issue
Block a user