If you use cursor.com this can be useful
duti
can be used to directly remap the vscode://
URL scheme to the cursor://
application without the need for an intermediary script.
-
Install
duti
(if you haven't already):brew install duti
-
Find the Bundle Identifier for the Cursor Application:
You'll need the bundle identifier for the Cursor application. You can usually find it by checking the application's Info.plist or by running the following AppleScript command in Terminal:
osascript -e 'id of application "Cursor"'
Let's assume the bundle identifier for the Cursor application is
com.example.Cursor
. -
Remap the URL Scheme:
Use
duti
to remap thevscode://
URL scheme to the Cursor application. Run the following command in Terminal:duti -s com.example.Cursor vscode
Replace
com.example.Cursor
with the actual bundle identifier of the Cursor application.
To verify that the remapping is working correctly, you can test it with a vscode://
URL. For example, use the following command in Terminal:
open "vscode://file/somefile.text:123"
This should now open the URL using the Cursor application instead of Visual Studio Code.
com.todesktop.230313mzl4w4u92
is the bundle identifier confirmed by this post: https://forum.cursor.com/t/cursor-bundle-identifier/779