Hi vimmers.

I try using input() function to build a shell-like interface to an
application. I am stuck at the custom completion part of the input()
function. For example:

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? 

Please Cc, Thanks.

-- 
Dasn


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

Reply via email to