[TxMt] Making '*.html.erb' files have the rhtml icon in the project drawer?

Shanti Braford shantibraford at gmail.com
Mon Jan 7 09:47:25 UTC 2008


Hello,

I was wondering if anyone could point me in the right direction here.  I
searched the list archives and have tried the following.

Opened up ~/Applications/TextMate.app/Contents/Info.plist and found this
entry:

        <dict>
            <key>CFBundleTypeExtensions</key>
            <array>
                <string>rhtml</string>
            </array>
            <key>CFBundleTypeIconFile</key>
            <string>RHTML</string>
            <key>CFBundleTypeName</key>
            <string>HTML with embedded Ruby</string>
        </dict>

Which I modified to be:

        <dict>
            <key>CFBundleTypeExtensions</key>
            <array>
                <string>rhtml</string>
                <string>erb</string>
            </array>
            <key>CFBundleTypeIconFile</key>
            <string>RHTML</string>
            <key>CFBundleTypeName</key>
            <string>HTML with embedded Ruby</string>
        </dict>

I also later tried:

        <dict>
            <key>CFBundleTypeExtensions</key>
            <array>
                <string>rhtml</string>
                <string>html.erb</string>
            </array>
            <key>CFBundleTypeIconFile</key>
            <string>RHTML</string>
            <key>CFBundleTypeName</key>
            <string>HTML with embedded Ruby</string>
        </dict>

Saved Info.plist, then Quit completely out of TextMate.  Next, opened up an
existing rails project, but the 'index.html.erb' for example, still showed
the generic TextMate icon in the project drawer, not the tiny blue globe one
that 'rhtml' files use.  (I really like the way it strikes the eye... what
can I say?)

Has anyone been able to get Rails 2.0's new 'html.erb', 'css.erb', etc.
files to show up in the drawer with teh sexy rhtml icon? =)

Cheers,

- Shanti

ps. this is probably completely unrelated, but I also went through Finder
and did the 'get info' -> 'change all' trick to open all 'html.erb' files in
TextMate, yet the icon in Finder remains the generic white OSX one, not
TextMate's.  Figured that's an OS X thing but thought I'd mention it just in
case.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20080107/24f15ccf/attachment.html>


More information about the textmate mailing list