Hi Dasn!

On Mo, 27 Apr 2009, Dasn wrote:

> fun! MyFileComplete(ArgLead, CmdLine, CursorPos)
>     let ret=["file1", "file2", "file3"]
>     ".... A lot more other processing
>     return ret
> endfun
> 
> let cmd = input("Talking to Shell> ", "", "customlist,MyFileComplete")
> 
> Then at the prompt, I type:
> Talking to Shell> cp <Tab>    "Hit tab wanna got a file completion
> 
> The problem is: When I hit <Tab>, the "cp " (i.e, the command part) was
> also unexpectedly replaced by 'file1', 'file2' or 'file3'. It seems that
> the completion does not occur at the cursor position. Am I in the right
> way to complete this, or any idea to make a completion at the current
> cursor position? 

I think you are looking for complete-functions, rather than 
command-completion.

So please read :h complete-functions.

regards,
Christian
-- 
:wq!

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to