Shell not showing properlly in VSCode - visual-studio-code

I'm using zsh with the Powershell theme and I have a customized prompt that works properly in iTerm, but it's not displaying correctly in VSCode. I have already made the setting for the terminal to inherit.
iTerm prompt:
VSCode prompt:
Amy I missing a setting somewhere?

My iTerm was using a different font, I had to change the one in Visual Studio to match it.

Related

VS_Code : Shell Integration Failed To Activate

When i hover on my vscode terminal name: (in terminal's upper right corner named "Powershell")
it shows : shell intergartion failed to activate,
how to solve this error, while
I tried installing vs code again but still no change, and also installed powershell 7
There are a few potential solutions for this issue.
Make sure that you have the latest version of VS Code and the Shell Integrate extension installed.
Check that the integrated terminal in VS Code is set to the shell you want to use (e.g. PowerShell, Command Prompt, Bash).
Try running VS Code as an administrator.
If you are using Windows, try adding the path of the shell you want to use (e.g. C:\Windows\System32\bash.exe) to the "terminal.integrated.shell.windows" setting in your VS Code settings.
You can also try reinstalling vscode and the extension.
If none of the above solutions work, you can try searching for specific error messages in the output panel of vscode or in the output of the terminal.

PowerShell console in Visual Studio Code: How to copy-paste?

I cannot Copy-Paste from the Visual Studio Code console. In ISE one can copy-paste some of the output, but it does not seem to be possible in Visual Studio Code Terminal. How can I copy-paste the output from the console when running PowerShell commands? I have the PowerShell Extension.
Ctrl+C and Ctrl+V for copying / pasting work as-is in Visual Studio Code's integrated terminal.
By contrast, right-click behavior is configurable:
On Windows, the default behavior is to copy, if text is currently selected, and paste otherwise - as in regular console windows.
To get the same behavior as in the Windows PowerShell ISE, i.e. to instead show a shortcut menu, which contains Copy and Paste commands, add the following line to your settings.json file (before the closing }):
"terminal.integrated.rightClickBehavior": "default",
Alternatively, use the settings GUI (press Ctrl+,):
Note:
The screenshot was taken on macOS, where selectWord is the default setting; on Windows, it is copyPaste, with the behavior as described above.
Also note the GUI's convenient search feature: typing right click in the search field was sufficient to locate the relevant setting.

Change terminal prompt color/theme in Visual Studio Code on Mac

I would like to change the theme in the integrated terminal on Visual Studio Code to this:
https://jmp.sh/hNda3rA
As you can see there is a background color on the prompt.
Where and how can I do this? I use Mac and zsh.
This is nothing to configure in VS code but in your shell. The style is called Powerline and you can get it for zsh with Oh My Zsh. Probably you have to install a Powerline font on your Mac and configure VS code to use it for the shell in order to render the prompt properly.

How to enable middle-mouse-button-click to paste selected text in vscode's terminal?

I have to use VSCode on Windows and when I open a bash terminal in VSCode, I can select text and paste it with a right-mouse-button-click.
I would like to change that to the middle-mouse-button-click just like it works on macos and Linux.
Is there a way to set VSCode/Codium like that?
The same problem (no middle-click paste) occurs when using VSCode on macos, opening a zsh terminal.
I am using VSCodium version 1.61.2
You should make a feature request at https://github.com/microsoft/vscode/issues.
Because this code checks for isLinux and ignores isMacintosh.

Integrated Terminal Setting VS Code and iTerm returns zsh

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.
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?
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.
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",
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.