Skip to main content
added 12 characters in body
Source Link
Gareth
  • 18.9k
  • 15
  • 58
  • 69

I would like to know Emacs' equivalent of Vim's :n, which opens several several files according to a glob.

Say I have this directory:

-rw-rw-r-- 1 pablo pablo 31 Jun 25 00:59 /home/pablo/tmp/prueba.php
-rw-rw-r-- 1 pablo pablo 2442 May 9 1913 /home/pablo/tmp/sin_soap.php
-rw-rw-r-- 1 pablo pablo 726 Jun 25 15:20 /home/pablo/tmp/verificar.php

-rw-rw-r-- 1 pablo pablo   31 Jun 25 00:59 /home/pablo/tmp/prueba.php  
-rw-rw-r-- 1 pablo pablo 2442 May  9  1913 /home/pablo/tmp/sin_soap.php  
-rw-rw-r-- 1 pablo pablo  726 Jun 25 15:20 /home/pablo/tmp/verificar.php

AndIf I wantwanted to open all those files. In Vim, I cancould type

  the following in Vim:n *php

:n *php

and thatThat will give me one buffer for every file; I don't know how to do do that in Emacs (when it's already open, of course I can do 'emacs *php'emacs *php in a shell).

I'm happy with a function that I can call from any buffer via M-x, but if if there's a command that I can call in dired-mode (say, edit all marked marked files or something), that would be beyond cool.

Thanks.

I would like to know Emacs' equivalent of Vim's :n, which opens several files according to a glob.

Say I have this directory:

-rw-rw-r-- 1 pablo pablo 31 Jun 25 00:59 /home/pablo/tmp/prueba.php
-rw-rw-r-- 1 pablo pablo 2442 May 9 1913 /home/pablo/tmp/sin_soap.php
-rw-rw-r-- 1 pablo pablo 726 Jun 25 15:20 /home/pablo/tmp/verificar.php

And I want to open all those files. In Vim, I can type

 :n *php

and that will give me one buffer for every file; I don't know how to do that in Emacs (when it's already open, of course I can do 'emacs *php' in a shell).

I'm happy with a function that I can call from any buffer via M-x, but if there's a command that I can call in dired-mode (say, edit all marked files or something), that would be beyond cool.

Thanks.

I would like to know Emacs' equivalent of Vim's :n, which opens several files according to a glob.

Say I have this directory:

-rw-rw-r-- 1 pablo pablo   31 Jun 25 00:59 /home/pablo/tmp/prueba.php  
-rw-rw-r-- 1 pablo pablo 2442 May  9  1913 /home/pablo/tmp/sin_soap.php  
-rw-rw-r-- 1 pablo pablo  726 Jun 25 15:20 /home/pablo/tmp/verificar.php

If I wanted to open all those files, I could type the following in Vim:

:n *php

That will give me one buffer for every file; I don't know how to do that in Emacs (when it's already open, of course I can do emacs *php in a shell).

I'm happy with a function that I can call from any buffer via M-x, but if there's a command that I can call in dired-mode (say, edit all marked files or something), that would be beyond cool.

Source Link

Find several files with one command in Emacs

I would like to know Emacs' equivalent of Vim's :n, which opens several files according to a glob.

Say I have this directory:

-rw-rw-r-- 1 pablo pablo 31 Jun 25 00:59 /home/pablo/tmp/prueba.php
-rw-rw-r-- 1 pablo pablo 2442 May 9 1913 /home/pablo/tmp/sin_soap.php
-rw-rw-r-- 1 pablo pablo 726 Jun 25 15:20 /home/pablo/tmp/verificar.php

And I want to open all those files. In Vim, I can type

:n *php

and that will give me one buffer for every file; I don't know how to do that in Emacs (when it's already open, of course I can do 'emacs *php' in a shell).

I'm happy with a function that I can call from any buffer via M-x, but if there's a command that I can call in dired-mode (say, edit all marked files or something), that would be beyond cool.

Thanks.