visual studio code remote integrated terminal not showing zsh theme - linux

I use Remote SSH extension (from a Windows PC) to connect to a remote Linux Redhat host where all my development work happens. I use zsh as the default shell in VS code integrated terminal.
Here is the content of my .zshrc file:
export ZSH="/home/myname/.oh-my-zsh"
ln -s /home/myname/tools/dracula-theme-master $ZSH/themes/dracula.zsh-theme
SAVEHIST=10
HISTFILE=~/.zsh_history
ZSH_THEME="dracula"
source /home/myname/tools/zsh-syntax-highlighting-master/zsh-syntax-highlighting.zsh
I manually downloaded all the themes. Here is what I have under $ZSH/themes/:
And I have this line in my VS code settings.json:
"terminal.integrated.shell.linux": "/bin/zsh"
When I exectue
echo $TERM:
Everything seems to be set correctly. But the theme does not seem to display properly showing below:
But I am expecting something like this (e.g., showing current git branch, richer syntax highlighting):
Is it because VS code integrated terminal dose not support displaying the themes?

Related

Terminal resize issue with Intellij and Git for Windows SDK

I am on Windows running Intellij and Git for Windows SDK for a feature rich terminal on Windows (pacman, oh my zsh, etc...)
I looked up previously on which command to use to make it the default Intellij Terminal and SO delivered:
How can I launch git-for-windows SDK's git-bash in Windows Terminal?
I am using the cmd from above's 2nd post:
C:\git-sdk-64\msys2_shell.cmd -defterm -here -no-start -mingw64
Everything works fine except for a stubborn resizing issue :
Every time I resize the Intellij Terminal, the MSYS terminal stops receiving key strokes and I have to reopen a new one:
( can't type after the resize under the echo hello )
Trying to avoid WSL for now as I noticed maven builds through wsl were noticeably slower than directly on powershell or via git terminal.
Workaround
Not exactly a solution but if you run with MinGW32, the resize no longer causes the problem
To be seen if I will suffer from other 32/64 bit incompatibilities
using for now:
C:\git-sdk-64\msys2_shell.cmd -defterm -here -no-start -mingw32

visual studio code is not launching in linux even though it is in the path

visual studio code is not launching in linux even though it is in the path
I tried "code ." and expect to open the vscode for the current folder
export DISPLAY=:0 made my day
My Display was not set.It was unset while doing other debugging. reverting it make the window app launch from terminal.
DISPLAY is part of your linux serverx, usually the linux terminal doesn't support launching the window applications from terminal until the display is configured. so it is essential to make sure you have the right config for your DISPLAY arg for your serverx

How to setup Windows Subsystem Linux (WSL 2) with VSCodium on Windows 10

So I am using Ubuntu Linux terminal(also have Debian) in windows 10. according to this site:
https://medium.com/nerd-for-tech/how-to-setup-windows-subsystem-linux-with-visual-studio-code-on-windows-10-b06fdbe9b30b
you need Remote - WSL extention to connect with VScode, I am using VSCodium.
So my question is can I install Remote - WSL extention on VSCodium.
Or are there any alternatives to configure it without this extension.I saw on VSCodium market and there is no Remote - WSL.
My purpose is with Ubuntu or Debian terminal to create folders and files such html,css,js.
I can do all this by entering in desktop environment :
cd /mnt/c/Users/<username>/Desktop
and also can use this commands:
pwd
cd
cd ..
clear
cd /
cd ~
mkdir
touch
mv
My problem is that I can not open created folder or any app(including VSCodium), for example open existing folder using this command:
open . or open index.html
this commands are not working.can you help with that?
how can I open created folder,file or app using terminal.
Is there any extension to connect VSCodium to my WSL2 and do all commands above?
You cannot legally use any of the MS "Remote" extensions as they are closed source and cannot legally be installed on anything other than Microsoft Visual Studio Code, as per the license.
AFAIK there is no open source alternative yet.

Cygwin not displaying Vi editor content over ssh

I am pretty new to Cygwin configuration and would need some help.
I have installed Cygwin successfully on a windows 2019 server and is able to ssh to a centos server.
However, while on the centos server there is nothing displayed when I issue the command “vi test.txt”. It shows a blank screen as I type and save the file with the usual vi commands. When I do a “more test.txt” , it is displaying what I have typed though.
The same happens for existing file when I do a vi, but since I can’t see the content , what I typed has corrupted the file. Would need advice on how to display the vi editor correctly.
I was able to launch vi editor locally on the Cygwin window though (without ssh into remote server, on local machine).
Make sure OpenSSH package is installed with Cygwin.
Source: I am the coworker who helped the original poster figure out the issue irl.
We used the cygwin installer to look through the list of existing packages and noticed that OpenSSH showed as "skip". After installing that package, the issue was resolved.

Using Visual Studio Code on Windows with Ubuntu-Bash and NodeJS

I'm trying to figure out how to do my web development on Windows using the relatively new Windows Subsystem for Linux (Bash on Ubuntu on Windows) in conjunction with Visual Studio Code. I've configured the IDE to use the Bash in its integrated terminal, and I've set the project up such that the files are accessible in both the Linux and Windows file system.
The last thing I want to get set up is to get the IDE set up with NodeJS, but not NodeJS for Windows. I want it to use an installation of NodeJS in the Linux Subsystem. Does anyone know if it's possible to point VS Code to the Node installation in the Linux Subsystem?
This was a stumbling block for me too, until I found out that the real problem is that there's a pathing issue with WSL that creates a conflict if you already have NPM installed for Windows. Hopefully you've already figured this out yourself, but for anyone else who hits this, I'm copying in an excerpt from my longer guide on Visual C + WSL that's specific to this problem alone.
Given what you've said, I'll assume you already have node and NPM already installed in WSL's Ubuntu.
Using your favorite CLI editor (such as nano, vim, emacs, cat and sed… etc), open your ~/.profile
nano ~/.profile
Note: do NOT attempt to edit Linux files using Windows tools. (Thanks to #david-c-rankin's comment for the official link with the bold red text explaining this) If you don't want to use a CLI editor for this in the terminal, see the bottom of the answer this is excerpted from for a link on how to get a GUI one running.
Currently, the default bash PATH variable in WSL is
PATH="$HOME/bin:$HOME/.local/bin:$PATH"
Which is injecting the windows path after the first two binary directories. Unfortunately, this doesn't result in /usr/bin being used before the windows installed npm, so add that before the final $PATH:
PATH="$HOME/bin:$HOME/.local/bin:/usr/bin:$PATH"
Save out, and then either reload the terminal or just source the path file
source ~/.profile
VSCode (v1.18) now has better WSL support for Node:
I use nvm to install Node on Ubuntu, although it should work fine if you install it normally.
e.g.
nvm install 9.2.0
nvm alias default 9.2.0
From the VSCode docs
If you want to run Node.js in the Linux subsystem on Windows (WSL), you can use the approach from above as well. However to make this even simpler, we've introduced a useWSL flag to automatically configure everything so that Node.js runs in the Linux subsystem and source is mapped to files in your workspace.
Here is the simplest debug configuration for debugging hello.js in WSL:
{
"type": "node",
"request": "launch",
"name": "Launch in WSL",
"useWSL": true,
"program": "${workspaceFolder}/hello.js"
}
I opened bash outside of the vs code and run the following command, to install node.
sudo apt install nodejs-legacy
and I'm able to run node with bash in vs code.

Resources