Larson, David schrieb:
Hello Dan,

I suggest wrapping these functions into vim commands and then leverage
the command completion feature. See:

:help :command-completion

HTH,
David

-----Original Message-----
From: Dan Fabrizio [mailto:[EMAIL PROTECTED] Sent: Monday, May 07, 2007 5:27 AM
To: [email protected]
Subject: FW: autocomplete on the command line from words in buffers

Hello All,


I want to develop a plugin just using vim scripts for the verilog
language.
In the plugin I have functions that require arguments that are words
used in
the current open buffers.

On the command line, I want to autocomplete these words that are
arguments
to functions.

For example:

:call function1("last_<Tab>","first_<Tab>")

In open buffers,  the words called last_buffer_value and
first_buffer_value
are used. So when I hit <Tab> I want that word to be completed so the
result
would be

:call function1("last_buffer_value","first_buffer_value")

Is there a way to do this?

Thanks in advance,
Dan Fabrizio

IMHO this will become difficult.

In Insert mode, Ctrl-N/Ctrl-P scans through the buffers for words, but
I think there is no way to make Vim provide a similar list of completions in the
command-line.

You have to (kind of) scan the buffers yourself ...

Please correct me if I'm wrong

--
Regards,
Andy

EOM

Reply via email to