3

If I am in Bash and type

vim -O file1 file2

I will get two files opened side by side. How can I get a similar effect but for :terminal windows, not for files?

0
4

You can specify commands to be run using the -c argument. Therefore, this should work for you:

vim -c 'terminal ++curwin' -c 'vertical terminal'

If your goal is just to have two terminal windows side-by-side, there are also non-vim solutions to this which may be more appropriate depending on your use case e.g. GNU screen, tmux.

1
  • Also, if you are going to type this by hand, you can shorten it to vim +'ter++curwin' +'vert ter'.
    – Quasímodo
    Feb 21 '21 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.