The following is probably the better solution:
julia> ENV["JULIA_EDITOR"]="code.cmd"
this works here under Windows 10 and assumes that the path to VSCode is added to the PATH environment. This is an option during installation of VSCode and there is a note that you have to restart the PC.
julia> ENV["PATH"]
"...snippped...;C:\\Users\\oheil\\AppData\\Local\\Programs\\Microsoft VS Code\\bin"
In this path there are two files:
code
code.cmd
where only code.cmd
can be started from within julia. If you try code
in a windows cmd shell, the extenstions .exe, .cmd and .bat are automatically tested, and as there is code.cmd, this one is executed. Looking into code
it is a unix/linux like shell script.
Though I hate that the Windows path variable is not considered when looking up executables… Thus I have to precisely say where each executable is that I might need and cannot just depend upon the executables available (on other systems where I have no control over the place).
So the path variable is actually considered, but my first attempt with code.exe, which is not in the bin
folder, created the impression that it is not.
@rapus95 can you cross check and change the solution for future solution seekers?