Recently I discovered nice plugin for Sublime Text 2 named PlainTasks. This package has pretty icon for *.todo files. After relatively long and painful research I've found this article. So solution is relatively simple.

First - copy icon file to Sublime Text 2 application folder.

cp ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/PlainTasks/icons/TODO.icns /Applications/Sublime\ Text\ 2.app/Contents/Resources/

Second - edit /Applications/Sublime Text 2.app/Contents/Info.plist file. Append extra <dict> block before last </array> tag. So end of Info.plist will look as follows

        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleTypeName</key>
            <string>TODO</string>
            <key>CFBundleTypeExtensions</key>
            <array>
                <string>todo</string>
                <string>todolist</string>
                <string>tasks</string>
                <string>taskpaper</string>
            </array>
            <key>CFBundleTypeIconFile</key>
            <string>TODO</string>
        </dict>
    </array>

</dict>
</plist>

And last - reload Info.plist file:

lsregister -r -f /Applications/Sublime\ Text\ 2.app/

As result - nice and clean icons.

And of course - everything will gone after upgrade to newer version.

Mon 15 October 2012
comments powered by Disqus