TextEdit is used by the system so it can't be removed, but I have another text editor I use and it causes confusion when text files that don't have a suffix or don't have a suffix which I've already associated with my real text editor open in TextEdit.

An example of this getting really strange in a workflow is if I've selected many files that I want to edit and open them all up at once, and some are in my real editor and others have opened in TextEdit in the background, but I'm unaware of that. Another example is simply knowing that I opened a file some time back, but not being able to find it anywhere in my text editor because it is actually sitting there in TextEdit.

I don't mind that .rtf files or .doc files open with TextEdit but I would like to make it so that a plain text file of an unknown type or one which hasn't been actively associated with my real text editor will never open up in TextEdit. Is there any way to do that? I'm using 10.8.3.

  • Click on a text file, Get Info, Open with, choose editor from popup menu, consider "change all"
    – Richard
    Mar 24, 2013 at 11:48
  • 1
    That doesn't help my described case of unknown file types or newly-appearing suffixes. For instance, if a file is titled README I can do this but it won't have any effect on a later file called LICENSE.
    – Halle
    Mar 24, 2013 at 12:02

1 Answer 1


I think this answer here is what you're looking for:

How does Mountain Lion set the default text editor for the "open -t" terminal command?

To change default text editor to e.g. textmate, execute this command in terminal then restart:

    defaults write com.apple.LaunchServices LSHandlers -array-add 
  • Thank you for the suggestion, but this doesn't quite work. Totally unknown files with text in them (for instance, a text file that I create with a new name in sublime text that doesn't have a suffix) open with Word.
    – Halle
    Mar 26, 2013 at 9:29
  • (Sorry, didn't mention that I changed the bundle identifier in your oneliner to the actual bundle id of my version of sublime).
    – Halle
    Mar 26, 2013 at 9:32

You must log in to answer this question.

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