Question: I want to open files without file name extension, including .dotsystemfiles (e.g. `.htaccess` or `.vimrc`) with a different editor than TextEdit. Doing the regular *Change All...* in the *Get Info* panel won't do the trick as it gives the following error:

![alt text](https://i.stack.imgur.com/K698M.png)

Answer: 
You need to change the editor for the `text/plain` mime type or `public.plain-text` UTI. The regular *Get Info* dialog changes the association for the file name extension, which these files don't have.

---

Get [RCDefaultApp](http://www.rubicode.com/Software/RCDefaultApp/) and install it.

Open *System Preferences » Default Apps » Apps*. Select your desired default editor, and look for either of the above in the application's list of supported types.

![alt text](https://i.stack.imgur.com/nY01w.png)
![alt text](https://i.stack.imgur.com/OmICA.png)
![alt text](https://i.stack.imgur.com/rOoWf.png)

Select the entry, and click *Set as Default*. You're done. Both opening from Finder and the command-line `open` will open your new default editor.

---

This also changes all `.txt` files and the like. I don't think this can be prevented, since OS X thinks both these and extension-less files are `public.plain-text`/`text/plain`.

---

To do this without *RCDefaultApp*, edit Edit `~/Library/Preferences/com.apple.LaunchServices.plist`.

Add an entry under `LSHandlers`, containing the UTI (key `LSHandlerContentType`, e.g. `public.plain-text`) and application bundle identifier (`LSHandlerRoleAll`, e.g. `com.macromates.textmate`).

It looks like this in *Property List Editor*:

![alt text](https://i.stack.imgur.com/4ZxPY.png)
![alt text](https://i.stack.imgur.com/o2Kn4.png)
RCDefaultApp is sadly no longer available, but [SwiftDefaultApps](https://github.com/Lord-Kamina/SwiftDefaultApps) is a modern replacement. It does not list MIME types, but I found that changing `public/data` on the "Uniform Type Identifiers" pane did the trick for files without an extension.