Vim: how to open multiple files into different tabs

vim

Let's assume I have a folder with source code files. I want to open certain files with vim.

Can I do it, so vim already put's them into different tabs?
(Just as like opening a folder in VS Code or any other text editor).

Best Answer

vim -p /path/to/src/project/*.cpp

If you expect to have a large number of files open at once in this manner, add a line akin to this to your .vimrc:

set tabpagemax=20

I believe the default is closer to ten.

Related Question