On 15/09/09 01:54, Hari Krishna Dara wrote:
[...]
> Sorry, it should be -nargs, not -args. The completion allows you to
> complete filenames, by pressing<Tab>, though won't help much with the
> wildcards. BTW, I don't actually know if wildcards can be used in
> :args.
>
According to the help they can: under ":help args-f" the arguments to
":args" are given as [++opt] [+cmd] {arglist}, and the first words under
":help {arglist}" are "The wildcards in the argument list"...
For those such as Tim Chase who don't want to clobber their argument
list, Vim 6 and later offers the possibility of a "local arguments list":
(untested)
:command -nargs=* -complete=file -bar Msplit
\ new | arglocal <args> | exe "argdo split" |
\ close | syn enable
See ":help :arglocal"
Notes:
- "close" to close the duplicate window for the last argument ("argdo
split" repeatedly opens an argument in the current window, then splits,
which leaves us with two windows on the last argument)
- "syn enable" because the Syntax autocommand is disabled while running
"argdo".
- The splitting will stop early if there is no room. I recommend setting
'winminheight' to zero to allow opening a maximum number of windows. Of
course, there is still a limit, which will depend on how many 'lines'
you can afford.
- The use of continuation lines assumes 'nocompatible' at the time the
command is defined.
Best regards,
Tony.
--
Trying to establish voice contact ... please _yell_ into keyboard.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---