Extended completion
This commit is contained in:
parent
db60ba1fac
commit
4b9d86b470
1 changed files with 10 additions and 4 deletions
14
c4ctrl.vim
14
c4ctrl.vim
|
@ -162,8 +162,11 @@ function s:C4ctrlCompletion(ArgLead, CmdLine, CursorPos)
|
|||
try " Just for cleaning up in the finally statement
|
||||
if stridx("open", get(s:relCmdLine, 1)) == 0
|
||||
if a:ArgLead != ""
|
||||
return "open"
|
||||
elseif len(s:relCmdLine) > 2 " Do not return more than one name
|
||||
if len(s:relCmdLine) == 2
|
||||
return "open"
|
||||
endif
|
||||
elseif len(s:relCmdLine) > 2
|
||||
" Do not return more than one file name
|
||||
return ""
|
||||
endif
|
||||
let s:cfgdir = s:FindConfigDir()
|
||||
|
@ -197,8 +200,11 @@ function s:C4ctrlCompletion(ArgLead, CmdLine, CursorPos)
|
|||
|
||||
elseif stridx("write", get(s:relCmdLine, 1)) == 0
|
||||
if a:ArgLead != ""
|
||||
return "write"
|
||||
elseif len(s:relCmdLine) > 2 " Do not return more than one name
|
||||
if len(s:relCmdLine) == 2 && a:ArgLead != ""
|
||||
return "write"
|
||||
endif
|
||||
elseif len(s:relCmdLine) > 2 && a:ArgLead == ""
|
||||
" Do not return more than one file name
|
||||
return ""
|
||||
endif
|
||||
let s:cfgdir = s:FindConfigDir()
|
||||
|
|
Loading…
Reference in a new issue