It’s quite simple, so let’s not belabour the explanation here.

You simply pass the files to be opened to -o for horizontal splits and -O (uppercase o) for vertical splits.

The following works in Vim as well as Neovim.

  • horizontal split e.g.
vim -o file.go file_test.go
  • vertical split e.g.
vim -O file.go file_test.go

That’s it 😬