0

Is it possible to load multiple files at the same using :edit? I tried:

:e ~/dev/myproject/*.c

and it did not work.

(Note this is different than "How to open multiple files matching a wildcard expression?" because in that question he is not using :edit)

5
  • 1
    But the answer is the same -- :edit doesn't take more than one argument, so use one of the commands that does.
    – jamessan
    Jul 14 '17 at 1:50
  • @jamessan I do not want to give multiple args, I want to use ONE argument which is a wildcard. Jul 14 '17 at 2:17
  • 1
    Yes, and that one argument is expanded to multiple filenames, which :edit doesn't not accept. :edit only accepts a single filename, so use a command which supports multiple filenames.
    – jamessan
    Jul 14 '17 at 3:23
  • 1
    If your wildcard does only expand to a single filename, you can simply use your command given, e.g. :e *.txt, however Vim will complain, if this expands to more than one file. So you can e.g. use :argadd *.txt|:next or similar. Jul 14 '17 at 5:54
  • Another related question: How can I open multiple tabs at once? Jul 14 '17 at 19:06

Browse other questions tagged or ask your own question.