How can I open several files at once in Vim?

Solution 1:

The command you are looking for is args:

For example:

:args /path_to_dir/*

will open all files in the directory

Solution 2:

Why it doesn't work if I want to open all files ending with a certain extension? I tried

:n ./**.cs

and opens only the files in the currenty directory.

I found the answer.The correct code is :n **/*.cs

For more information :h find

Solution 3:

Did you try

:n /some/path/*

It will open all files in /some/path

I don't think it'll open file recursively though.

EDIT

Maybe using ** will open recursively as daf mentionned