I know how to split windows in vim, but it's possible to open multiple files using vim in split mode (at startup) from the command line?
vim file1 file2 file3
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.Sign up to join this community
You can use the option
-o to open the files in horizontal splits or
-O (letter "O") to open vertical splits. The following commands open a window for each file specified:
vim -o *.cpp vim -O foo bar baz
You can tell Vim the maximum number of windows to open by putting an integer after
O options, the following example will open at most two windows no matter how many file matches, you will see the first two file specified on the command line, the rest will remain hidden:
vim -o2 *.cpp
:help -o for all the details.