Add "Open with Visual Studio Code" shortcut to right click menu - visual-studio-code

Right click menu Example
Step 1: open Run and open regedit
opening regedit
Step 2: in regedit go to this Directory "Computer\HKEY_CLASSES_ROOT\Directory\Background\shell"
navigate to directory
Step 3: Create new key.
Creating new key in shell.
Setting up name and Icon of the shortcut:
values
(Default): "Shortcut name" [ Open with VSCode in the example image]
Icon: "Shortcut icon" [ Path to icon ...\Code.exe in the example]
Command:
Creating command
Create new key in your dir and set the "(Default)" to the command.
(Default) : "PATH TO VSCODE" " ."
This is not Question. Adding "Open with Visual Studio Code" option to right click menu.

Related

vscode: how to have copy filename in the right click context menu in file explorer

I am using visual studio
In the explorer, how can I have option to copy filename
There is no option to copy filename when I right click on a file in explorer
The below image shows what I meant
You can use the extension Context Menu Extra v0.2.0
I have added the context command Copy File Name

How can I open Visual Studio Code's 'settings.json' file?

I did it many times, and each time I forgot where it was.
Menu File → Preferences → Settings.
I get this:
I want to open file settings.json (editable JSON file) instead. How can I do that?
To open the User settings:
Open the command palette (either with F1 or Ctrl+Shift+P)
Type "open settings"
You are presented with a few options¹, choose Open User Settings (JSON)
This image was taken in the VS Code online editor
Which, from the manual and depending on platform, is one of:
Windows %APPDATA%\Code\User\settings.json²
macOS $HOME/Library/Application\ Support/Code/User/settings.json
Linux $HOME/.config/Code/User/settings.json
The Workspace settings will be in a {workspaceName}.code-workspace file where you saved it, and the Folder settings will be in a .vscode folder if and when it has been created.
Official page on User and Workspace Settings
As stated by sevencardz below, VS Code includes a button in the Settings UI gutter which can be used to switch between JSON and graphical view.
The workbench.settings.editor option selects which of the settings files is opened by default when not using the above method, such as with the shortcut ⌘+, or through the application menu.
Footnotes
The aforementioned settings, User and Workspace. Remote settings will appear when using WSL.
By a test this maps to %APPDATA%\Roaming\Code\User\settings.json, I am not sure by what logic.
On the settings UI page, there's a special button in the top right corner gutter that toggles between the settings.json file and the settings UI.
Bonus Answer:
Add "workbench.settings.editor": "json" to your settings.json file. This will make it so that menu File → Preferences → Settings or ⌘ + , opens your settings.json file by default. Optionally, add a comment at the top to remind yourself where the toggle button is.
// Click the Open Settings (UI) button in the top
// right corner gutter to toggle the settings UI
{
// Other settings in settings.json
// ...
"workbench.settings.editor": "json"
}
Follow these steps:
Shift + CMD + P
Type "settings"
Click on "Preferences: Open Settings (JSON)"
Visual Studio Code Tips and Tricks
If you want to edit local workspace/folder settings instead of global user settings, you can edit the file .vscode/settings.json (shortcut: Ctrl/Cmd + P and type "settings.json").
If that settings.json file or the folder .vscode do not exist, you can create them in the folder directory.
These settings will apply to the specific project.
These changes are global, so it will affect all of your projects.
You can change the settings.json file from user preferences.
Menu File → Preferences → Settings → Extensions → search for "Edit in settings.json"
Eventually edit these files directly:
Linux: $HOME/.config/Code/User/settings.json
macOS: $HOME/Library/Application Support/Code/User/settings.json
Windows: %APPDATA%\Code\User\settings.json
On Windows, the default keybind to open the settings UI within VSCode is Ctrl + ,. From there, there is a button at the top right to "Open Settings (JSON)":
That is one way to get to it. For convenience, I have bound Ctrl + Shift + , to opening the settings JSON. For reference, the setting ID for that is workbench.action.openSettingsJson.
Open VS Code.
Go to settings by clicking the keyboard shortcut ctrl + , or with GUI
File -> Preferences -> Settings
Refer this image
Click on the Open Settings (JSON) icon.
Refer to the image
Once you click on the icon it should open settings.json file
If still, that did not work.
Go to the search bar and type json:scheme
There click on Edit in settings.json. This should work.
But still, if it hit you in the head with a brick please let me know.
In Just 2 steps
1- Hit the shortcut Ctrl+Shift+P
(If you use a MAC it's ⌘+Shift+P):
2- Type in the search bar user settings json, and finally press Enter:
And you're done! Here you can change the general configs of VS Code in the settings.json.
However note that that there are also other types of settings.json which are relative to a project or a workspace for instance.
On a Mac the settings file is found at ~/Library/Application\ Support/Code/User/settings.json - it can be opened from the command line:
open -a 'visual studio code.app' ~/Library/Application\ Support/Code/User/settings.json
On Windows:
Click (Fn) + F1 (or Ctrl + P + >)
Type open settings json
Select Preferences: open settings (JSON)

Ctrl + Click in VS Code terminal, show open folder in new window

When I want to Ctrl + Click the error link in terminal VS Code (first project), it showing Open folder in new window (I felt uncomfortable when this happened)
Open folder in new window
but when open second project file and ctrl + click the error link in terminal VS Code, it showing Open file in editor
Open file in editor
I want to set default my terminal, if I ctrl + click on terminal, it showing Open file in editor (second project).
Do you know how to do it?

Eclipse keyboard shortcut to open build path of current project?

I often have to edit the build path of my project in eclipse. Is there a keyboard shortcut that will open the window as "configure build path" option in Eclipse?
Right click on any project in package explorer, select Build Path..> Configure Build Path...
Select any project in package explorer press Alt + Enter.
First step is necessary as property dialog remembers the previously selected node.

How to add an application shortcut but not display on the start menu

I need to have a shortcut to my application that has command line options pre-configured. This would only be used for troubleshooting so I don't want it "easily" found by a user. My thought was to create a shortcut in the program directory during install. This shortcut would not be on the start menu. During troubleshooting, the user would navigate to the program directory and double click on the shortcut thus invoking the program with the debugging options.
Is there a way using Install4j actions to create an application shortcut that is NOT on the start menu?
You can do that with a "Create start menu entry" action by setting the "Entry name" property to an absolute path name, like:
${installer:sys.installationDir}/Debug Launcher link
You can replace "Debug Launcher link" with a path in your installation directory.