In vim, I want to create a new command that takes a file-name as its single argument.
Is there a way to create such a command, so that the file-name-completion-magic (using tab) will work?
views:
132answers:
1
+3
A:
Just use -complete=file
in the command arguments.
:help :command-completion
For example:
:command -complete=file -nargs=1 OpenFile e <args>
Al
2009-07-29 10:03:41