Opening many files using wildcards

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Opening many files using wildcards

Fabien Meghazi
Hi all,

I would like to open many files in buffers using one operation.
So I would be able to do something like this in vim   :e *.cs

Is there a way to do this ?

--
Fabien Meghazi
http://www.amigrave.com
Reply | Threaded
Open this post in threaded view
|

Re: Opening many files using wildcards

Fabien Meghazi
> vim *.cs +ba

In fact I would like to do this in an already opened instance of vim.


--
Fabien Meghazi
http://www.amigrave.com
Reply | Threaded
Open this post in threaded view
|

RE: Opening many files using wildcards

vishnu-3
In reply to this post by Fabien Meghazi
Hi Fabien,

Use 'args' command for opening files using wildcards.
:args *.cs

~VIshnu

-----Original Message-----
From: Fabien Meghazi [mailto:[hidden email]]
Sent: Friday, June 24, 2005 9:06 PM
To: ML:Vim
Subject: Opening many files using wildcards

Hi all,

I would like to open many files in buffers using one operation.
So I would be able to do something like this in vim   :e *.cs

Is there a way to do this ?

--
Fabien Meghazi
http://www.amigrave.com

Reply | Threaded
Open this post in threaded view
|

Re: Opening many files using wildcards

Fabien Meghazi
In reply to this post by Fabien Meghazi
> Lastly, if you want to keep your current buffers, you can use
>
>         :argadd *.cs

Thanks !
Exactly what I need !
Reply | Threaded
Open this post in threaded view
|

Re: Opening many files using wildcards

Michael Naumann
On Friday 24 June 2005 17:48, Fabien Meghazi wrote:
> > Lastly, if you want to keep your current buffers, you can use
> >
> >         :argadd *.cs
>
> Thanks !
> Exactly what I need !
>
>


There also is
  :n *.cs

HTH, Michael
Reply | Threaded
Open this post in threaded view
|

Re: Opening many files using wildcards

Greg Matheson
On Sat, 25 Jun 2005, Michael Naumann wrote:

> On Friday 24 June 2005 17:48, Fabien Meghazi wrote:

> > >         :argadd *.cs

> There also is
>   :n *.cs

The help says that is the same as |:args_f|.
But it doesn't seem to replace the old arguments list. That is,
like :argadd, it adds the files to the args list.

--
Greg Matheson, Taiwan
Reply | Threaded
Open this post in threaded view
|

Re: Opening many files using wildcards

Antony Scriven
On Jun 25, Greg Matheson wrote:

 > On Sat, 25 Jun 2005, Michael Naumann wrote:
 >
 > > On Friday 24 June 2005 17:48, Fabien Meghazi wrote:
 >
 > > > >         :argadd *.cs
 >
 > > There also is
 > >   :n *.cs
 >
 > The help says that is the same as |:args_f|.
 > But it doesn't seem to replace the old arguments list. That is,
 > like :argadd, it adds the files to the args list.

Works for me on 6.3.

Antony
Reply | Threaded
Open this post in threaded view
|

Re: Opening many files using wildcards

Greg Matheson
On Mon, 27 Jun 2005, Antony Scriven wrote:

> On Jun 25, Greg Matheson wrote:

>  > On Sat, 25 Jun 2005, Michael Naumann wrote:

>  > > On Friday 24 June 2005 17:48, Fabien Meghazi wrote:

>  > > > >         :argadd *.cs

>  > > There also is
>  > >   :n *.cs

>  > The help says that is the same as |:args_f|.
>  > But it doesn't seem to replace the old arguments list. That is,
>  > like :argadd, it adds the files to the args list.

> Works for me on 6.3.

Are you saying that :n does replace the old argument list for you?

:n works for me too on 6.3, but like :argadd, not :args as the
help for :n advertises.

--
Greg Matheson, Taiwan
Reply | Threaded
Open this post in threaded view
|

Re: Opening many files using wildcards

Antony Scriven
On Jun 27, Greg Matheson wrote:

 > [...]
 >
 > Are you saying that :n does replace the old argument list for you?
 >
 > :n works for me too on 6.3, but like :argadd, not :args as the
 > help for :n advertises.

I cannot see any conflict with the docs. Is this what you
mean?

   ~/tmp $ vim a*
   3 files to edit
   "a1" 0L, 0C
   :args
   [a1] a2 a3
   :n b*
   "b1" 0L, 0C
   :args
   [b1] b2 b3

VIM - Vi IMproved 6.3 (2004 June 7, compiled Mar 17 2005 10:13:22)
Included patches: 1-61
Compiled by [hidden email]
Normal version without GUI.

Antony
Reply | Threaded
Open this post in threaded view
|

Re: Opening many files using wildcards

Greg Matheson
On Mon, 27 Jun 2005, Antony Scriven wrote:

> On Jun 27, Greg Matheson wrote:

>  > Are you saying that :n does replace the old argument list for you?
>  > :n works for me too on 6.3, but like :argadd, not :args as the
>  > help for :n advertises.

> I cannot see any conflict with the docs. Is this what you
> mean?

>    ~/tmp $ vim a*
>    3 files to edit
>    "a1" 0L, 0C
>    :args
>    [a1] a2 a3
>    :n b*
>    "b1" 0L, 0C
>    :args
>    [b1] b2 b3

That's what I get too. I have been confusing the
argument list and the buffer list.

Also, for some reason, I thought the buffer
list was being rewritten by :args b*
but added to by :n b*

--
Greg Matheson, Taiwan