Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS code - 2 split terminal in one (split)

As I'm working with Node.js and Angular, I've currently work with two terminals where I have to switch terminal by the dropdown option.

Is there a way to have two terminals (split) in the same place like this:

enter image description here

Couldn't find a way.

like image 475
ipid Avatar asked Jan 30 '18 12:01

ipid


People also ask

How do I split a terminal code in Visual Studio?

Groups (split panes)# Multiple terminals can be placed side-by-side are called a group and are created by splitting a terminal: On hover, selecting the inline split button. Right-clicking the context menu and selecting the Split menu option. Alt and click on a tab, the + button, or the single tab on the terminal panel.

How do I open two terminals in VS Code?

Open commands search (use Ctrl+Shift+P or from menu View->Command Palette...) In command box Type "Terminal: Select Default Shell" to select this option from drop down. Just click any one which you like to add for quick access from command list.

How do I switch between split terminals?

Switching between panes The terminal allows you to navigate between panes by using the keyboard. If you hold the Alt key, you can use your arrow keys to move your focus between panes.


2 Answers

Update - Visual studio code has this feature starting with version 1.21

Split terminals

The Integrated Terminal can now be split such that multiple are visible at once, which can enable much easier management of terminals when you need a watch and a run command for example:

Open the article to see the GIF demonstration.

enter image description here

Splitting can be done by clicking the split button in the panel, through the context menu or the command Ctrl+Shift + 5.

....


Before VS Code introduced the feature

Inside vs code

You can configure your console to bash or cygwin, and then install and use tmux or screen.


Initial answer before I understood the question intent was to do it inside vs code

Outside vs code

On windows

I'm using Cmder. It allows opening multiple cmd tabs, and configure more types of command lines / tabs - such as bash, nodejs etc.

screen shot of side by side consoles in Cmder

On Linux

I got to play a bit with tmux and I heard it's a good option.

Screen shot from google:

On Mac

As Brad stated - tmux works also on Macs, so have a look at the Linux section above.

like image 169
arieljannai Avatar answered Jan 04 '23 03:01

arieljannai


VSCode has added support to split the integrated terminal in february 2018, as requested by this issue.

At the time it is not yet released, you need to install the Insiders version of VSCode.

You have to set the keybindings yourself, the default are still being discussed here.

like image 22
Bilow Avatar answered Jan 04 '23 03:01

Bilow