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.
MacOS – TextMate 2 changed files’ icon
iconmacostextmatexcode
Related Question
- MacOS – Change Folder Icon for Shared Dropbox Folder
- MacOS – How to change the icon of an alias to a custom ICO file
- IOS – Find out which app icon is missing in xcode for an app
- MacOS – How to reset file icons associated with default program on El Capitan
- How to change file icon based file’s extension (.txt, .cpp, .docx, etc)
- MacOS – Is it possible for an AppleScript .scpt file to retain a custom icon, even after edits have been made to the code
- MacOS – Clear desktop icon cache
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.