How to configure edit/define_editor for vscode

Hi,
I am trying to use the function edit to open the source code of a given function. From the documentation it says that I have to configure/call define_editor first.
Would someone be able to tell me how I can do that given that I am using vscode and running on windows.
Thank you

consider

ENV["JULIA_EDITOR"]="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\""

I have this in my startup.jl file in c:\users\yourname.julia\config
Now @edit maximum(3,2) opens VS code.

1 Like

From this post, the line below in startup.jl produces the same result (Win10):

ENV["JULIA_EDITOR"] = "code.cmd -g"
2 Likes

This does not work for me. Probably I need to have vscode installed in my environment variable PATH. I have installed vscode from zip file.