Guys how do i open multiple files in vim with a single command?
These files i want to open has some kind of pattern, example:
myfile1dsa
myfile2dsdas
myfile3xzczxcz
and also do these opened files create their own tab in my vim window?
and out of topic question:
what does "--" means in a linux command? how does it differ from just "-"?
example:
grep --color 'data' fileName
You can open them from within vim
using
:args myfile*
or if you want to open all files matching the pattern in subfolders
:args **/myfile*
This all assumes your current directory is the folder from wich you want to open files from. Prepend a directory to myfile if it's not.
:args /yourfolder/myfile*
:args /yourfolder/**/myfile*
Edit (cudo's to romainl)
To open all the files found in tabs, you can use
:argdo tabe
wich essentially goes like this:
argdo
: for each file in the argument listtabe
: open a new tabpage and edit the file If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With