It's a matter of principle for me as I'm struggling with it for a long time. I had this issue back on Mavericks and now on Yosemite 10.10.5.
What I'm trying to do is to set Sublime text 3 as a default text editor for all plain text files (my target were files with . and without extension, e.g .bashrc).

Here is an extract of ~/Library/Preferences/com.apple.LaunchServices.plist after I used this Replace Text Edit as the default text editor advice:

    LSHandlers =     (
            LSHandlerContentType = "public.plain-text";
            LSHandlerRoleAll = "com.sublimetext.3";

In Finder when I press CommandO on e.g .gitconfig file it still opens with TextEdit. Any help would be appreciated.

  • Did you read the comments in the cited answer and already performed a dual reboot?
    – klanomath
    Sep 3 '15 at 9:44
  • What about simply selecting a file of the type you want to change, and do a Get Info, In that window, you can choose a preferred app for the file and also select Use this app to open all such files. I find that choice holds, even in Yosemite.
    – Zo219
    Sep 4 '15 at 2:33
  • Doesn't work through Get Info on file as files doesn't have an extension, multiple reboots didn't work either. But made it with this duti answer apple.stackexchange.com/a/123954/140831 Sep 4 '15 at 12:38

The best results with setting default applications I have achieved with a little tool called RCDefaultApp.

It installs as a preference pane in System Preferences. Open System Preferences > Default Apps and change all the applicable extensions and/or UTIs to Sublime Text.

  • How do you set if the extension or UTI is not known? This is the question
    – mmmmmm
    Sep 4 '15 at 12:47
  • RCDefaultApp hasn't been updated since 2009. That's generally not a good sign.
    – user24601
    Sep 4 '15 at 13:18
  • Thanks Arthur. Any ideas what the reason for the downvote was? (And its a shame this problem is so widespread yet Apple has refused to fix it. I know for certain they know about it because I filled a RADAR on it years ago).
    – user83961
    Oct 10 '15 at 13:20
  • @jww Not sure to be honest. I have fought with this problem for the longest time as well. RCDefaultApp finally did the trick for me.
    – Arthur
    Oct 11 '15 at 8:44

Not the answer you're looking for? Browse other questions tagged .