Vim 8.1 added the :terminal
command, which opens up a new bash terminal as a split. However, it always seems to be a horizontal split, and I prefer vertical splits. Is there a way to open a terminal as a vertical split without using:
:vsp
:terminal
<c-w>j
:q
Alternatively, is there a way I could add it as a command in my .vimrc, like so:
command Vterm :vsp | :terminal | <c-w>j | :q
The command above chokes on trying to execute <c-w>j
, opens a new vim split with the following:
executing job failed: No such file or directory
Just having:
command Vterm :vsp | :terminal
Works fine, but leaves the original split.