Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

anemo

macrumors newbie
Original poster
Sep 25, 2023
2
1
In MacOS Ventura, how can I configure Sublime Text as the default text editor for all files with MIME type `text/plain`

Please don't suggest using the `Open with` option in the `Get Info` window.
This doesn't work for many of the files I work with daily, like `dotfiles`, files without extensions, etc.

I have to use the `Open with` context menu tens of times every day, and it's so very annoying.

Any help would be much appreciated.
 

ignatius345

macrumors 604
Aug 20, 2015
7,024
11,555
I set my more common file types (.txt, .md, a few others) to open with Sublime, but in the end I just resigned myself some time ago to using the context menu or dragging the file onto Sublime in the dock.

I wonder if one could set up some kind of Automator action or script that would take the selected Finder item and pass it on to Sublime, triggered by a key shortcut of some kind. Still more work than double-clicking, but maybe less work than right-clicking :)
 

Fishrrman

macrumors Penryn
Feb 20, 2009
28,519
12,648
I'll offer a suggestion.
It may work for you.
Or... it may not.
But... the only way you'll know is if you try it.

There is an old, but still usable (at least up to and including Mojave, which I still use) preference pane called "rcdefaultapp" which is superior to anything else out there.

It's now discontinued by its author but it's still available here:

I suggest you download it and put it into:
(root level) System --> Library --> Extensions.
Then, reboot.

Open system preferences (or settings).
Is the Default Apps extension "there"?

If it isn't, I'm guessing it doesn't work any more.
Just trash it.

If it IS THERE, then I'm going to guess it still works (at least for now).
So, do this next:
Click on the "extensions" pane.
Scroll down (a long way) until you see "text".
Click it and look to the right.

It will show you the default application for "text" files.
You can click on the popup -- do so.
You mentioned the app "Sublime Text" -- is it there?
If so, select it.

If it's NOT there, try the "other" option at the bottom of the popup menu.
It should open a dialog that lets you select any app in your applications folder.
Select Sublime Text and see if that "takes".

Now, close System preferences and try double-clicking on the file in question.
Did this work for you?

Again, you're not going to KNOW, unless you TRY it.

EDIT:
I just tried it for myself.
I downloaded Sublime Text.
Open RCDefault app and set it to be the app to use for file extension "text".
Double-clicked on a text file on my desktop.
It opened into Sublime Text.

So... it seems to work here, using Mojave.
 

bonchonjon

macrumors newbie
Apr 30, 2023
6
1
I'll offer a suggestion.
It may work for you.
Or... it may not.
But... the only way you'll know is if you try it.

There is an old, but still usable (at least up to and including Mojave, which I still use) preference pane called "rcdefaultapp" which is superior to anything else out there.

It's now discontinued by its author but it's still available here:
Somebody ported it to swift, and has now resumed development on it, so there's hope for new versions. I managed to get it to run on Ventura? Maybe it was Monterey, can't remember for sure.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.