Is there a way to open all the files in a directory from within Vim? So a :command
that would say in effect "Open all the files under /some/path
into buffers".
Ideally, it would be great to open all the files under a dir recursively.
Is there a way to open all the files in a directory from within Vim? So a :command
that would say in effect "Open all the files under /some/path
into buffers".
Ideally, it would be great to open all the files under a dir recursively.
The command you are looking for is args:
For example:
:args /path_to_dir/*
will open all files in the directory
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
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