I'm using Windows Subsystem for linux and the best text editor experience so far has been VS Code- Insiders with their WSL remote addon. However, despite repeated efforts I've only had partial success in replicating the functionality where within my WSL (zsh) terminal I can type code .
or code XX
to open a directory in code. I do have a function that works, opening the WSL directory in code insiders, but it does not go through the WSL interface somehow so I am using a powershell/ windows environment where I wanted all linux. This function works to some degree, and is provided.
I tried a simple alias (didn't work because of windows spaces in directory path). This version works - but I then have to ctrl + shift + p
-> Remote WSL: Reopen Window In WSL
.
function code(){
/mnt/c/Users/camer/AppData/Local/Programs/Microsoft\ VS\ Code\ Insiders/Code\ -\ Insiders.exe $1
}
I'd like the function to work as expected - when run within WSL it opens the windows (.exe) VSCode insiders with a WSL session already.