Opening a vertical terminal in Vim 8.1

Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
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.
vim vimrc
add a comment |Â
up vote
4
down vote
favorite
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.
vim vimrc
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
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.
vim vimrc
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.
vim vimrc
edited May 19 at 9:37
Thomas
3,38741023
3,38741023
asked May 18 at 18:49
Schiem
1234
1234
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
I'm not sure about regular vim, but the help says the ++curwin option doesn't split the current window. So you should be able to do something like:
:vs|:term ++curwin
Or you could use Neovim and just do :vs|:terminal or :vs term://bash :)
1
Perfect, works like a charm as a command.
â Schiem
May 18 at 21:15
add a comment |Â
up vote
5
down vote
You can use the :vert[ical] command modifier:
:vert term
:vertical works with any command that splits a window, for example:
:vert copen
:vert help vert
This should be the accepted answer; way more straightforward
â Alex Garcia
Jun 21 at 21:18
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
I'm not sure about regular vim, but the help says the ++curwin option doesn't split the current window. So you should be able to do something like:
:vs|:term ++curwin
Or you could use Neovim and just do :vs|:terminal or :vs term://bash :)
1
Perfect, works like a charm as a command.
â Schiem
May 18 at 21:15
add a comment |Â
up vote
2
down vote
accepted
I'm not sure about regular vim, but the help says the ++curwin option doesn't split the current window. So you should be able to do something like:
:vs|:term ++curwin
Or you could use Neovim and just do :vs|:terminal or :vs term://bash :)
1
Perfect, works like a charm as a command.
â Schiem
May 18 at 21:15
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
I'm not sure about regular vim, but the help says the ++curwin option doesn't split the current window. So you should be able to do something like:
:vs|:term ++curwin
Or you could use Neovim and just do :vs|:terminal or :vs term://bash :)
I'm not sure about regular vim, but the help says the ++curwin option doesn't split the current window. So you should be able to do something like:
:vs|:term ++curwin
Or you could use Neovim and just do :vs|:terminal or :vs term://bash :)
answered May 18 at 20:56
m0dular
63115
63115
1
Perfect, works like a charm as a command.
â Schiem
May 18 at 21:15
add a comment |Â
1
Perfect, works like a charm as a command.
â Schiem
May 18 at 21:15
1
1
Perfect, works like a charm as a command.
â Schiem
May 18 at 21:15
Perfect, works like a charm as a command.
â Schiem
May 18 at 21:15
add a comment |Â
up vote
5
down vote
You can use the :vert[ical] command modifier:
:vert term
:vertical works with any command that splits a window, for example:
:vert copen
:vert help vert
This should be the accepted answer; way more straightforward
â Alex Garcia
Jun 21 at 21:18
add a comment |Â
up vote
5
down vote
You can use the :vert[ical] command modifier:
:vert term
:vertical works with any command that splits a window, for example:
:vert copen
:vert help vert
This should be the accepted answer; way more straightforward
â Alex Garcia
Jun 21 at 21:18
add a comment |Â
up vote
5
down vote
up vote
5
down vote
You can use the :vert[ical] command modifier:
:vert term
:vertical works with any command that splits a window, for example:
:vert copen
:vert help vert
You can use the :vert[ical] command modifier:
:vert term
:vertical works with any command that splits a window, for example:
:vert copen
:vert help vert
edited May 19 at 14:17
answered May 19 at 14:12
Daniel DÃaz Carrete
1936
1936
This should be the accepted answer; way more straightforward
â Alex Garcia
Jun 21 at 21:18
add a comment |Â
This should be the accepted answer; way more straightforward
â Alex Garcia
Jun 21 at 21:18
This should be the accepted answer; way more straightforward
â Alex Garcia
Jun 21 at 21:18
This should be the accepted answer; way more straightforward
â Alex Garcia
Jun 21 at 21:18
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444682%2fopening-a-vertical-terminal-in-vim-8-1%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password