H
H
hajdoz432018-05-22 18:57:01
Code editor
hajdoz43, 2018-05-22 18:57:01

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

5 answer(s)
A
Anton Mashletov, 2018-05-22
@hajdoz43

Manual means
https://remontka.pro/add-program-context-menu/

M
Marina, 2018-09-30
@Mo_Ginger

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

M
Maizerer, 2021-04-25
@Maizerer

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

2. I went to the Registry Editor ( win+R and regedit)
In the \HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command
folder, I changed the default value to the path to vscode.bat (I have it C:\Users\user\Desktop\ vscode.bat ), change it depending on where you have the .bat file.
6085816bb2f55543036469.png
Similarly, I changed the default path in the \HKEY_CLASSES_ROOT\Directory\shell\vscode\command folder
And it all worked!
Now when you click Open Folder as VS Code Project in the context menu, the terminal opens for a second and launches Vs Code in the desired folder.

N
NitroDesktop, 2020-05-07
@NitroDesktop

Thank you.
The icon didn’t work for me, I just deleted the numbers and that’s it, maybe someone else will have this :)

A
amstudio, 2021-12-01
@amstudio

Update the program by reinstalling and add checkboxes to open with.
61a73320248bb864654215.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question