>> :msplit filename*
>>
>> then this should be equivalent to
>>
>> :args filename*
>> :all
>
> The problem I have with :all is that it opens *all* the
> arguments. I frequently find myself in the position where I've
> started vim with something like
>
> vim *.py
>
> and have all my project's python files open. I then want to
> split open a bunch of files in some other directory:
>
> :argadd path/to/wherever/*.sql
> :all
>
> The :all ends up giving me all the .sql *and all the .py files*
> when all I really want is all the .sql files. The command I
> whipped out earlier in this thread:
>
> :command! -nargs=1 Sp for fname in split(glob("<args>"),
> '\n')<bar> exec 'sp '.escape(fname, ' \\')<bar> endfor
>
> allows me to issue
>
> vim *.py
> :Sp path/to/wherever/*.sql
>
> and only split open all the .sql files without opening a window
> for all the .py files in my project.
>
> I'm sure the command can be improved...it was a 5-minute hack as
> a proof of concept. :)
Thanks a lot! Even if it was a 5-minute hack, it actually works very
nicely. And it's better than the Msplit command that Gary, as far as I
can see for not quite the reason you write, but because if I open a
file with 'vim something' then after :Msplit filename* _only_
filename* will be open and the originally opened 'something' will be
gone. But with your command this does not happen.
Thanks again,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---