I am looking for a way to open all files in my path that match a regex such as ‘MyFileName*.cpp”.
I was hoping that the command below would open all matching files in tabs. But it opens a list of files and allows me to select one to open.
:tabf MyFileName*.cpp
A few things to note of what I am looking for:
-
only search files in the vim path. Any
**globbing takes too
long and I would rather open each file one by one at that point. -
It needs to work from within vim. (not vim -p)
The solution I came up with is here:
Then all you have to do is the following
:Tabf MyFileName*.cpp