0
1
I edit lots of .sass, .scss, html.twig files. And so I wanted to associate these with Sublime Text 2. Because by default some of them get the "binary"-icon, some the "blank sheet"-icon which sucks in terms of clarity in the folders. I want them to use the CSS and HTML icons Sublime uses for .css and .html files. Therefore I opened the Info.plist in the Package Contents and edited it like that:
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeName</key>
<string>SASS</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>sass</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>CSS</string>
</dict>
and for html.twig and email.md.twig
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeName</key>
<string>HTML</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>html</string>
<string>html.twig</string>
<string>email.md.twig</string>
<string>htm</string>
<string>shtml</string>
<string>xhtml</string>
<string>phtml</string>
<string>inc</string>
<string>tpl</string>
<string>tmpl</string>
<string>tpl</string>
<string>ctp</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>HTML</string>
</dict>
(FYI, I followed: How to set an icon for a file type on Mac?)
Notice, that I use CFBundleTypeIconFile
: HTML and CSS, so the icons definitely exist (since they work with .css and .html).
But after closing and moving the whole App to the ~/Desktop
launching it and moving it back to ~/Applications
, launching it again, nothing happens. I also tried rebooting OS X.
I'm also sure, that I don't have already set a custom icon to these files (via the Info-Dialog). I created some new test.sass etc. files on my desktop to check that.
Does someone have an idea what I'm doing wrong here? And is it even a good idea to edit the Plist.info anyway? What happens when the App gets updated?
Mainquestion: What am I doing wrong here? ;-)
Or: Is there a different way to associate the correct icons for (e.g.) all .sass-files (and not separately for each single file)
THANKS!
To clarify, the files are associated with the Sublime Text 2 program and open in it when double-clicked? – Daniel Beck – 2012-01-26T18:49:14.797
Cannot reproduce. Here's a screenshot of the Info.plist values used. Have you tried doing this step by step? It could be possible OS X cannot handle two file extensions (
html.twig
?) and therefore ignores the edited Info.plist file. Maybe try justtwig
instead. – Daniel Beck – 2012-01-26T18:56:05.067Weird. I'll try it on another Mac tomorrow and come back to you. Thanks for testing it yourself. – woerndl – 2012-01-26T19:34:19.310
Please keep me informed. Make sure to add
@DanielBeck
to your comment so I'll get notified. – Daniel Beck – 2012-01-26T19:36:00.167