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 can also run `plutil -convert xml1 ~/Library/Preferences/com.apple.LaunchServices.plist` and add something like this:

```
<dict>
    <key>LSHandlerContentType</key>
    <string>public.plain-text</string>
    <key>LSHandlerRoleAll</key>
    <string>com.macromates.textmate</string>
</dict>
<dict>
    <key>LSHandlerContentType</key>
    <string>public.unix-executable</string>
    <key>LSHandlerRoleAll</key>
    <string>com.macromates.textmate</string>
</dict>

```

You can apply changes by restarting or by rebuilding the Launch Services database. Logging out and back in isn't enough.

Or add this to a [duti](http://duti.org) configuration file:

```
com.macromates.textmate public.plain-text all
com.macromates.textmate public.unix-executable all

```

`public.plain-text` also includes files with a `.txt` or `.text` extension. I don't know any way to [change the default application for files with arbitrary extensions](https://apple.stackexchange.com/questions/60591/how-to-permanently-put-textedit-in-the-open-with-menu-list).

`public.unix-exexutable` includes executable scripts without a filename extension. If you try to change the default application for them from Finder, there is an error like this:

> 
> **The operation can’t be completed.**
> 
> 
> An unexpected error occurred (error code -50).
> 
> 
>
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.