Macos – On OS X, how do you change a file’s “Kind”

file associationmacos

On OS X I'd like to change the "Kind" label associated with files. Many of my files are showing up as "Plain Text File" when they are really javascript, php, css, and other file types.

I don't have a problem getting them to open with the application I want, it's easy to do – there are lots of threads on this.

The thing that bugs me is when I have a big folder with lots of files in it, I'd like to be able to sort by Kind and have all css, all php, and all js files together.

enter image description here

I saw file type which crashes on OSX, and I saw quickchange but I'm not sure if that's really what I need.

Maybe somebody else has dealt with this before and knows how to fix it?

Best Answer

The file kind is usually set by the application that handles that file type in Launch Services. For most of them, this is the application opening a file type by default, in your case, Coda.

Applications specify file types in their Contents/Info.plist file. You can see and edit it by right-clicking the application bundle and selecting Show Package Contents.

It looks like the Panic folks messed up something. All file types they define are PlainTextType:

enter image description here

You can change the name of the file type by editing all Document Type Name entries in Property List Editor, or all CFBundleTypeName entries when editing the file in a normal text editor. Just replace what you want to appear as description instead.

enter image description here

Edit, save, and make sure Launch Services notices (restart, log out, or just move the application to a different folder and back again), and the result looks like this:

enter image description here


You need to repeat this whenever there's an update to the application, since those replace the Info.plist file you edited. Best to report a bug to the developers at Panic.

Related Question