Hi list,

Using ":command", I can define a custom command that can be completed
with variables names:
:com -nargs=* -complete=var Foo call foo(<f-args>)
which will let me complete :Foo from already defined variables.

I can also define a command that can be completed with options names:
:com -nargs=* -complete=option Bar call bar(<f-args>)
which will let me complete :Bar from vim options

I want to create a command FooBar that can be completed from both
options and variables.
I know I should be using custom completion, with a function like:
:function {func}(ArgLead, CmdLine, CursorPos)
returning the list of possible names for completion. What is the
simplest way to get variables and options in lists in order to return
them in my completion function?

Thank you,
Christophe-Marie

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui