16

I'm trying to use iterm as my focus terminal inside vscode. I've setup "terminal.external.osxExec": "iTerm.app", but I get zsh instead of iTerm. screenshot of terminal in vscode

I'm able to right click on a file and open in iterm but I love the integrated terminal, and want to use iTerm here.

How do I use iterm as my terminal?

Joseph Chambers
  • 3,698
  • 4
  • 22
  • 37
  • Can you clarify what you mean by "focus terminal"? As far as I can tell VSCode has 2 different terminal integrations. One is the [integrated terminal](https://code.visualstudio.com/docs/editor/integrated-terminal), which you trigger with "ctrl+`" (ctrl+backtick) for example, and for which you can customize the *shell* (bash, zsh...). The other is the _external_ terminal, that you trigger with "⌘⇧C". Maybe some features allow to chose which one opens, but I guess some will be limited to the integrated one. So can you clarify for what feature you'd like to use iTerm? – Hugues M. May 22 '17 at 21:54
  • 1
    Yes, I want to use iterm as my integrated terminal. – Joseph Chambers May 23 '17 at 17:01
  • OK but can you clarify for what feature? Without this clarification, the answer is "you can, just type the right keyboard shortcut". – Hugues M. May 23 '17 at 17:20
  • Sure, specifically the theme I'm using in iterm. – Joseph Chambers May 24 '17 at 16:07

3 Answers3

43

You cannot set iTerm as the integrated terminal for VS Code. I have explained below why.

iTerm is not a shell but a terminal emulator which in your case is running the zsh shell.

I believe you are confusing the terms Shell and a terminal emulator.

iTerm is a terminal emulator. Some examples of terminal emulator are Gnome terminal, Guake, Xterm etc. They provide a display to the shell which is installed in the OS.

A shell is a command line interface that reads and interprets your commands. Examples of shell are bash which comes by default in Linux and other shells like zsh, fish, sh.

Visual Studio Code integrated terminals use the shell itself and not the terminal emulator. In Windows OS the distinction between shell and terminal emulator is not present so Powershell and Command Prompt are both the shell and the emulator.

But for Unix like OSes there is a distinction.

I believe you use iTerm as the terminal emulator and the shell used is zsh (pronounced Z Shell which is a fork of bash Bourne Again Shell).

Here is a wikipedia article on Unix Shell. This talks about what a Unix shell really is.

This link is about Terminal emulators which also talks about the history of terminals.

This link gives a list of terminal emulators that are available. iTerm is a terminal emulator for Mac OS.

Kronos
  • 2,210
  • 1
  • 14
  • 10
  • 1
    Also the support for changing the integrated terminal colors was removed in VS code. Refer this [question](https://stackoverflow.com/questions/42307949/color-theme-for-vs-code-integrated-terminal) for more details. – Kronos May 24 '17 at 18:30
10

Though you can customize your normal terminal using this

then later remember to go to settings then assign the new configurations to override the default ones

"terminal.external.osxExec": "iTerm.app",

"terminal.integrated.fontFamily": "Meslo LG S DZ for Powerline",

"terminal.explorerKind": "external",
lacostenycoder
  • 10,623
  • 4
  • 31
  • 48
herbertug
  • 593
  • 6
  • 9
1

The accepted answer has precisely addressed the question.

Here I will add a side note:

Why do you want iterm2 in integrated shell? My answer is: I want the "copy on selection" feature of iterm2.

Actually vscode has this setting for the integrated terminal!

Settings > Terminal > Integrated: Copy On Selection

By the way, vscode also allows you to split the terminal, which is like iterm2.

fstang
  • 5,607
  • 4
  • 25
  • 26