Eric Smith wrote:
How do I add a string so that it occurs at the prompt which is spaned
by the input() command? I could potentially delete all or part of this
string or just start typing after it.

My prompt might look like:

Enter item to search for:   set_
                                             ^
                                            cursor

The "set_" will be added to whatever I type at the cursor.

Thanks


See ":help input()"

The input() function takes (at least in Vim 7) up to three arguments, as 
follows:

        input({prompt} [, {text} [, {completion}]])

{prompt} is the "question" text Vim will ask the user

{text} if present and not empty, is the default reply. IIUC, this is what you want.

{completion} (optional) is the kind of completion to use. Valid values (which must be quoted) are:

augroup
buffer
command
dir
environment
event
expression
file
shellcmd
function
help
highlight
mapping
menu
option
tag
tag_listfiles
var
custom,{func}
customlist,{func}

(see ":help command-complete").


Best regards,
Tony.

Reply via email to