> :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. :)
-tim
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---