0

With regular find-file it's possible to supply *.[ch] to open all .c or .h files in a directory. ido-find-file doesn't seem to support this behavior.

I know I can press C-f while ido-find-file is open to switch back to regular find-file, but is there a way to tell ido that I always want to use the regular expression matching?

Help says that C-t toggles regular expression matching, but it doesn't seem to have any affect to me.

  • 2
    FWIW, when you use C-x C-f *.[ch] RET you are not using a regexp. You are using a file globbing pattern (see the shell). And this pattern-matching is only for RET, not for completion. If you want to use regexps for pattern-matching for completion, try Icicles. – Drew Nov 18 '14 at 16:29
3

Ido cannot select multiple items. You'll have to use the normal find-file or Helm.

On the Emacs wiki there seems to be a gist for multi selecting items in Ido but I'm not sure if it works: http://www.emacswiki.org/InteractivelyDoThings

  • ido-toggle-regexp does work. The problem is that it only allows using regexps to filter candidates, not selecting multiple candidates. – Constantine Nov 18 '14 at 16:53
  • Can you give an example of it working? If I input something like o.*g or org$ in my directory of org files nothing appears. – nanny Nov 18 '14 at 16:56
  • Starting with a default-directory full of .c and .h files, try pressing C-x C-f C-t [ c h ] $ (key presses are separated by spaces here). Once you're done typing ido will filter out candidates that don't match. Note that it uses regexps and not globbing. Now press C-t and it should say "No matches" (assuming that you don't have files with that strange name). – Constantine Nov 18 '14 at 17:00
  • Ahh, my problem was that you can't do this with (flx-ido-mode 1) on. – nanny Nov 18 '14 at 17:07
  • @nanny that's the limitation of Ido. You can only open only one file. If you want to open multiple files across your project, consider using helm-projectile-find-file. Here is a demo: as you see, I opened all marked files and later using helm-mini to show all available buffers that were created from multiple-file opening. You can also do the same thing with helm-find-files, except for the current directory only (since helm-find-files is a replacement for stock find-file). – Tu Do Nov 18 '14 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.