Today I Learned: How to handle Jetbrains Toolbox URLs in Windows
I use Obsidian, and being able to jump from a Task there right into a chunk o' code would be nice.
In IntelliJ, you can right click a file and choose: Copy Path/Reference, and then Toolbox URL. However, Windows doesn't know how to open those. You can teach it, though.
To set Windows 11 to open a URL with the "jetbrains://idea/navigate" scheme in IntelliJ IDEA Ultimate, you'll need to register the custom URL scheme in the Windows registry. Here are the steps:
Open the Registry Editor:
- Press
Win + R, typeregedit, and press Enter.
- Press
Navigate to the URL Protocols:
- Go to
HKEY_CLASSES_ROOT.
- Go to
Create a New Key:
- Right-click on
HKEY_CLASSES_ROOT, selectNew > Key, and name itjetbrains.
- Right-click on
Set the Default Value:
- Select the
jetbrainskey, and in the right pane, double-click on the(Default)value. Set it toURL:JetBrains Protocol.
- Select the
Create a URL Protocol String:
- Right-click on the
jetbrainskey, selectNew > String Value, and name itURL Protocol. Leave its value empty.
- Right-click on the
Create a Shell Key:
- Right-click on the
jetbrainskey, selectNew > Key, and name itshell.
- Right-click on the
Create an Open Key:
- Right-click on the
shellkey, selectNew > Key, and name itopen.
- Right-click on the
Create a Command Key:
- Right-click on the
openkey, selectNew > Key, and name itcommand.
- Right-click on the
Set the Command Value:
- Select the
commandkey, and in the right pane, double-click on the(Default)value. Set it to the path of your IntelliJ IDEA executable, followed by the URL parameter. For example:"C:\Program Files\JetBrains\IntelliJ IDEA 2023.1\bin\idea64.exe" "%1"
- Select the
After completing these steps, Windows should recognize the jetbrains://idea/navigate URL scheme and open it with IntelliJ IDEA Ultimate.
Thanks again Copilot.