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

1 Answer 1

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, 2021 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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