Reputation: 2612
I want to change the default terminal app used by Visual Studio Code for Mac. I am thinking it is part of preferences or settings json, but unsure.
Upvotes: 101
Views: 141250
Reputation: 1689
For those that want to change the default integrated terminal NOT just the external, and add custom themes
, show which git branch
you are on, and whether or not files need to be staged or committed
for example.
Make sure you have these installed:
Install a powerline font
(I am using Menlo which is a nice looking and very popular font).
Go here and click on
download
Open the file
Click on
install font
(Note: without this, vscode integrated terminal will not render themes correctly)
Open the .zshrc file by running this command:
cd ~ ; code .zshrc
Change iTerm's theme to agnoster
:
Press
⌘f
to open search in the .zshrc fileType
ZSH_THEME
Search until you find the live code, NOT the commented out code :)
Edit the code it so it looks like
ZSH_THEME="agnoster"
Save the file
Open vscode settings using shortcut:
⌘,
Inside of vscode settings, you will see two panels. On the right panel paste this:
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.fontFamily": "Menlo for Powerline"
Assuming the settings were empty before, it should now look like this:
{
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.fontFamily": "Menlo for Powerline"
}
Finished! Enjoy your new pimped out terminal
If you want your prompt to display something other than your username such as a thunder bolt, like in mine or anything you want
Open agnoster theme by runnning this command:
cd ~/.oh-my-zsh/themes/ ; code agnoster.zsh-theme
Open search by pressing:
⌘f
Paste this in search bar:
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m"
To change your what your prompt displays, edit ONLY this part:
$USER@%m
DO NOT CHANGE this part:
prompt_segment black default "%(!.%{%F{yellow}%}.)
In conclusion, the code should now look something like this:
prompt_segment black default "%(!.%{%F{yellow}%}.) Insert here whatever your heart desires"
(Note: Technically you can change everything about your terminal prompt, but for the sake of keeping this short, and simple we only edited the username part)
Upvotes: 110
Reputation: 71
In vscode settings.json
add:
"terminal.integrated.profiles.osx": {
"zsh": null
},
Upvotes: 1
Reputation: 5967
None of these answers fully worked for me. Here is what I changed to get it to work:
zsh
:CMD + SHIFT + P
to open up the command palette. Then type Terminal: Select Default Shell
. You can then select zsh
.
Upvotes: 25
Reputation: 1998
I recently changed my terminal in VSCode to ozh, its just 1 step and 1 line.
Open Command Palette
using View > Command Palette
( or simply Command + Shift + P
)
add the following line to the user settings
.
"terminal.integrated.shell.osx": "zsh"
Upvotes: 13
Reputation: 3121
Here's an example of how to make another terminal the default for VSCode, in this example I've downloaded iTerm2 and copied iTerm2 to Applications.
"terminal.external.osxExec": "iTerm.app"
and "terminal.explorerKind": "external"
Upvotes: 150
Reputation: 71
well I know it's so late, but you could just change it by running command
Terminal: Select Default Shell
its so much easier
Upvotes: 7
Reputation: 3972
From visual studio code blog:
// 64-bit cmd it available, otherwise 32-bit
"terminal.integrated.shell.windows":"C:\\Windows\\sysnative\\cmd.exe"
// 64-bit PowerShell if available, otherwise 32-bit
"terminal.integrated.shell.windows":"C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"
// Git Bash
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
// Bash on Ubuntu (on Windows)
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe"
Reference: Integrated Terminal
Upvotes: 3
Reputation: 2759
No. But you can vote for this feature here: https://visualstudio.uservoice.com/forums/293070-visual-studio-code
Upvotes: -34