+63

Open multiple files with Goto Anything panel

Sergio Rus 13 aastat tagasi uuendaja Martin Trojan 8 aastat tagasi 10
I need a way to open several files from Goto Anything panel, for example, selecting the results with <ctrl + arrows> and <shift + arrows>
+1

Love the idea, I got so used to this. It makes a lot of sense when opening a file fnord_handler.py and its accompanying fnord_handler_test.py

-3

Well, if multi-select for opening is implemented, you'd be simply a CTRL-A away from what you're asking for. That's how I envision it happening:

  1. CTRL-P
  2. Type in your search string
  3. CTRL-A
  4. ENTER
  5. Profit!

+1

My bad: I didn't find this request when I created mine (http://sublimetext.userecho.com/topic/108660-open-multiple-files-at-once-from-goto-anything-ctrlp). I'll point people this way as this thread is older.

+2

I'd love this too, but rather than selecting which files to open, I'd like to open all files that match a regex or wildcard.


For example

ctrl+p

foo.*\.rb

=> opens foo.rb, foo_spec.rb, foo_steps.rb


I'm not sure whether I'd prefer regex here, or something similar to shell globs; probably the latter, thinking about it.  Regex is a bit jarringly heavyweight for a simple operation, with its escaping characters etc...

+1
Using control to toggle selection of files to open seems a bit clunky and not with the feng shui of Sublime.  Implementation of shift selection would be easy to implement mouse-free, which is a goal of sublime's interface.

As an alternative solution to "Make Goto Anything Easier to Open Similar Files", why not have Goto remember the last thing you typed, as well as the location of your last selection.  Auto-selecting the text in Goto will prevent this feature from interfering with classic usage patterns. Once you've done your Goto search, just Control-P, select file, Control-P, select file...
On your first point if the shift + keyboard-selection is implemented then why not take mouse input as well with either shift or ctrl? Both usages are so common place nowadays I can't see why they'd be considered "not simple enough".

But I really liked your second point as it seems to require minimal dev effort to deploy and would be a great step towards fulfilling this feature request.
+2

Maybe a half-way house to this feature would be to remember what you last typed. Then at least you could `cmd+p` and have the same file list ready to go.

It happens with `cmd+shift+p`, why not `cmd+p`?

+8

For those who wouldn't stumble upon the right topic, like me, who found the way by looking how to do it in Atom before attempting a switch (lol), here is one alternate way: use the RIGHT key to open the file selected on the Goto Anything panel.


I.e. type Ctrl+P, type your expression, then do DOWN, RIGHT, DOWN, RIGHT, DOWN, RIGHT, etc. for as many documents as you have.

That's as close as it comes. It would be awesome if you could select multiple documents like in JetBrains IDEs, but it doesn't exist yet. It is usable though, and you can preview them before opening everything blindly.

+1

Awesome! More than 5 years using ST and didn't know that shortcut! That's enough for me :-)

Thanks!!


P.S. Not sure if that shortcut has been around for a while or not, but the fact is that I never tried that combination of keys.

+2

In ST2 RIGHT arrow button in Goto Anything does nothing.