13

This seems quite basic, but I can only seem to create vertical splits in vs code, and would like to be able to create horizontal but don't know what the command is to do so.

I have tried looking through the commands prefixed with Terminal: , but don't seem to have anything that will create a new terminal in a horizontal split. The command that I'm using to create a new terminal is Terminal: Create New Integrated Terminal

baxx
  • 3,956
  • 6
  • 37
  • 75

6 Answers6

28

open a first terminal, then a second one, then right click a terminal: "move to editor area".

Bluz
  • 5,980
  • 11
  • 32
  • 40
  • 1
    Yes, I like this: Once the terminal window is in the editor area, instead of the pane, you can arrange it with the other editors however you like! The command is available for binding to a key: `Terminal: Move Terminal into Editor Area` – mike Nov 20 '21 at 23:56
8

Configure default terminal location

In theory you can configure the terminal location, using Workbench > Panel: Default Location:

enter image description here

The setting ID is workbench.panel.defaultLocation

The JSON is:

"workbench.panel.defaultLocation": "left"

That doesn't work for me. Sounds like a bug.

Work-around

To work around this you can:

  1. Pull up a terminal with Ctrl'
  2. Right click on the TERMINAL tab
  3. Select either "Move panel left" or "Move panel right"
  4. Click into the panel
  5. Hit CtrlShift5 to split the terminal
  6. You now have two terminals, one above the other
Terry Ebdon
  • 487
  • 2
  • 6
  • thanks, but i wanted to be able to have my code above / below the terminal – baxx Jul 24 '20 at 21:37
  • 1
    Two terminals, one above the other, both below the code window? – Terry Ebdon Jul 24 '20 at 22:15
  • 1
    ideally - i would like the option of putting a terminal anywhere a split can be made. At the moment it seems that I'm only able to place a terminal to the right of the code, in a vertical split, which isn't what I would like. An example of placing a terminal where I would like is for there to be a horizontal split, where one split contains code and the other contains a terminal. I would assume that, if this was possible, further splits could also be achieved, but for now I would like to be able to do this. – baxx Jul 25 '20 at 12:54
  • @baxx were you able to figure out how to have it both ways? By both ways, I mean having the panel on the right and being able to split the terminal vertically as opposed to horizontally to vice versa? – fortunee Oct 07 '21 at 22:54
  • i gave up on using terminal in vscode and just shift tab to iterm now – baxx Oct 09 '21 at 12:25
3

I have also found that changing the alignment of the terminal panel can give some more width and prevent crammed text in a narrow terminal column. To do this go into the VSCode menu...

View -> Appearance -> Align Panel -> Justify

This will place the terminal below everything and give extra width because it is no longer crowded by the Primary Side Bar.

Mike T
  • 513
  • 5
  • 14
2

On the terminal panel click on Configure Terminal Settings On the terminal panel click on Configure Terminal Settings

On the next screen change Default Location to editor On the next screen change Default Location to editor

Now if you create terminals it will create it in editor window

Adriaan
  • 17,741
  • 7
  • 42
  • 75
N.Parooei
  • 21
  • 1
1

Use tmux and use ITerm.app in your configuration

enter image description here

dgtlmonk
  • 64
  • 3
  • I'm curoius, what advantage does iTerm.app bring inside VSCode on OS X ? Also: here is a search link to splitting windows in Tmux, for those new to it: https://stackoverflow.com/search?q=tmux+split – mike Nov 20 '21 at 23:50
  • 1
    I found this to be very unhandy. You can't click inside the desired terminal and you need to learn the various keyboard combinations. – werty1st Jul 22 '22 at 13:00
0

If you're like me and your cat walked on your keyboard and opened a split terminal somehow, you can close it by right clicking the split piece and select Kill Terminal.

agm1984
  • 15,500
  • 6
  • 89
  • 113