Answer the question
In order to leave comments, you need to log in
How to add visual studio code to context menu?
Can you please tell me how to add visual studio code items to the context menu? So that by clicking the right mouse button you can open a file or project. I searched in the settings (carefully searched) - unsuccessfully. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
I understand that for the author it is no longer relevant, but maybe it will help someone else.
Reply to stackoverflow.com
Create a vsCodeOpenFolder.reg file with this content (if you didn't choose the default installation path, you need to adjust the paths in this file):Windows Registry Editor Version 5.00 ; Open files [HKEY_CLASSES_ROOT\*\shell\Open with VS Code] @="Edit with VS Code" "Icon"="C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe,0" [HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command] @="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\"" ; This will make it appear when you right click ON a folder ; The "Icon" line can be removed if you don't want the icon to appear [HKEY_CLASSES_ROOT\Directory\shell\vscode] @="Open Folder as VS Code Project" "Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0" [HKEY_CLASSES_ROOT\Directory\shell\vscode\command] @="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\"" ; This will make it appear when you right click INSIDE a folder ; The "Icon" line can be removed if you don't want the icon to appear [HKEY_CLASSES_ROOT\Directory\Background\shell\vscode] @="Open Folder as VS Code Project" "Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0" [HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command] @="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%V\""
Double-click it to create registry entries
If "Open With Code" is not displayed in the context menu of "Explorer", you need to restart the system.
If you are using 64-bit or Insider version of VS Code, change the path accordingly
I used the previous option and I just opened Vs code with the latest state (the folder in which it was located was not opened)
Perhaps due to the fact that I have VsCode not installed in the default folder, but on another disk
I decided this way:
1. Created a vscode file .bat with this content
code -r .
/c
code -r command. also works in console and opens Vs code from folder
Thank you.
The icon didn’t work for me, I just deleted the numbers and that’s it, maybe someone else will have this :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question