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?
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 communityYou 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.
vim +'ter++curwin' +'vert ter'
.
Feb 21, 2021 at 12:26