I want to be Visual Studio Code my default editor for all text-based file types in Windows. For Notepad++ there is an extension in the Windows Explorer to provide "Edit in Notepad++" for each file. How can I achieve this for "Edit with Visual Studio Code"? Do I have to "program" such extension on my own or are there any ready-to-use solutions available?
2 Answers
According to this blog post you can set this option during the installation process. If you want to add this option afterwards you either can follow the instructions of the rest of the post or (as recommended) reinstall vscode and then select that option during reinstalling.
When I faced the same issue, for me it was more comfortable to simply reinstall vscode.

- 10,065
- 3
- 44
- 55
-
4re-installation was real fast and easy. No need to uninstall first, just get the installer and run it, choose the context menu options, and done. – Matt Kemp Nov 05 '20 at 07:27
It is east !
step 1 --> Right click the file you want to always open with VS code
example - if you want to always open .txt files in VS code then Right click on any .txt file that is in you system see this
step 2 --> click on 'open with' see this
step 3 --> click on 'choose another app' see this
step 4 --> a new window will open, it will show all the applications on you system that are capable to open that file
click on VS code
and check the box at the bottom that says 'always use this app to open .txt files' see this
and then click on open
THATS IT
NOW ON .txt FILES WILL BE OPENED IN VS CODE
.txt file extension is just an example, you can do this to any file example .py, .html, .pdf etc.

- 15
-
1That was not the request. It was an option requested BESIDES the default application - an entry in the context menu like "Edit with VS Code" ... e.g. a .bat file I only want to edit open in VSC via context menu - not via default-app-double-click – Konrad Aug 15 '22 at 11:52