Make Cursor the default editor for all supported filetypes

Is there a way to make editor the default editor for all supported file types (on Mac)? It would be great to have it open when I click on a (supported) file as opposed to XCode. I work with a lot of different files so manually setting each via OS side settings is nearly impossible.

+1 on this

Maybe this helps: Changing the default application for all … - Apple Community


Why is it greyed out here though?

I managed to solve this problem by using terminal.

Step 1: Get the bundle identifier for the Cursor IDE app

osascript -e ‘id of app “Cursor”’

Step 2: Install duti via Homebrew if you haven’t already

brew install duti

Step 3: Set the Cursor IDE as the default app for a specific file type

Replace ‘com.cursor.ide’ with the actual bundle identifier you retrieved

Replace ‘.extension’ with the file extension you want to associate

duti -s com.cursor.ide .extension all

Example: To set Cursor IDE as the default app for .py files

duti -s com.cursor.ide .py all