Snap Open for Emacs?

I will need a script that will find and open files using a given template in the current directory and its subdirectories, like Snap Open for GEdit, fuzzyfinder for VIM, and OpenMate Open Files.

any ideas?

+2


source to share


6 answers


Not familiar with any of the libraries you link to, I don't know if this is the exact answer, but it looks like ido-mode will do at least some of what you ask and bundled with Emacs starting since version 22. Ido changes the default Emacs default way of working with files, as well as the buffer-buffer-search keys that supply completion lists for lines you enter, and using the Enter key to accept the current selection (which could be a directory allowing you to view the directory structure from the minibuffer). See the Ido EmacsWiki page for details .



+3


source


You can do this in the standard version too.

First do

C-u s

      

which allows you to change the dired ls command to -lR . You will now have subdirectories in a fading buffer.

% m 

      



Let you mark all files that match the regular expression.

To open files use the command

`dired-do-find-marked-files'

      

you need (requires "dired-x") for this.

+5


source


doesn't meet all your requirements, but one very simple way to open multiple files is to use glob patterns when opening a file (Cx Cf) eg ~/prj/*/*.[hc]

.

+3


source


Not exactly what you are asking, but close ifind.el

. To find all files with frog

in name and suffix .el

:

M-x ifind /some/path/*frog*.el

      

This does a search through all subdirectories in /some/path

.

It will not open all files automatically, but instead wipes out the buffer *compilation*

, which allows you to open them either by clicking on the files or by executing M-x next-error

(aka "Cx`").

This procedure will open each of the search results:

(defun visit-all-ifind-results ()
  "do next-error until there are no more"
  (interactive)
  (condition-case nil
      (while t
        (next-error))
    (error nil)))

      

So with that, you could just keep an eye on M-x visit-all-ifind-results

.

+1


source


You will need to write this yourself.

I sometimes like to open all relevant files in a project; I use the eproject command for this eproject-open-all-project-files

.

0


source


You can try ido mode. Read more below.

ido on emacswiki

0


source







All Articles