MacOS – TextMate 2 changed files’ icon

iconmacostextmatexcode

Several days ago, I installed the text editor TextMate 2. I notice that the icons of my .h and .m files which were created in Xcode have been changed to the new one. Like the screenshot below which shows the new icons (i.e. AppDelegate.h) and default icons (ViewController.h) at the same time. I am not sure it is the TextMate that caused this issue because if I right-click -> get info on the new icon, it stills display the default one. My question is how to restore the file's icon to their default looking? Thanks.

enter image description here

Best Answer

What you are seeing are QuickLook preview thumbnails: if you look closely at your screenshot, you will notice each “icon” shows the start of the file’s content. You are correct this is due to you installing TextMate 2, which provides a powerful QuickLook extension for source code files (try selecting one of the files in Finder and hitting space). The original file icon is unchanged by this, hence the fact it appears in “Get Info”.

As to the fact some files still display the original file icon: in my observation, there seems to be a bug in Yosemite’s Finder’s way of handling QuickLook thumbnail generation – some files will be missed at times.

If you want to disable TextMate’s QuickLook plug-in, this answer should help.