Set default editor to VSCode on Windows #2869
|
How I can set default editor to be vscode? Use cases: open and editing a gist: Also |
Answered by
just1a-person
Jan 29, 2021
Replies: 2 comments 3 replies
|
Can you try: gh config set editor code |
3 replies
Answer selected by
iqfareez
|
The command you are looking for is:\n\ngh config set editor "code --wait"\n\nThe --wait flag is critical. Without it, VS Code returns immediately because it delegates to a running instance, and gh thinks you closed the editor. --wait blocks until you close the file/tab.\n\nIf code is not in your PATH, use the full path (adjust username):\n\ngh config set editor "C:\Users\YOURNAME\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd --wait"\n\nVerify with: gh config get editor |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you try: