FileType Icons in File Tree


#1

I would like to see a file icons in the file tree, based on file extension (.rb, .html) or even file name (Gemfile).

For example, in a rails project the file tree gets rather large, if ruby files could have ruby shaped file icons, and .erb.html files have a different and easily recognisable icon then it would make skimming the project structure to find a particular controller or view much easier.

I would also like to extend icons to files without extensions such as Gemfile or Procfile as these are also significant.


#2

This package does that https://atom.io/packages/filetype-color


#3

That package is certainly a step in the right direction, the colour coding based on file extension is the right idea.
It does conflict with the git colour coding, which is why I think changing the file icon, even if it was just colouring the icon, would be better.


#4

That can be easily done, you can fork the package and instead of changing the color, you can change the icon.


#5

Thanks, I’ve gone and made a package which does what I’ve described

It’s not the most elegant implementation, it would greatly benefit from listening to FileTree events, of which I’ve only found one ‘tree-view:directory-modified’ that’s useful


#6

cool plugin. here’s a list of events that include several other tree-view events. also what about updating the icon on the file creation event as well?


#7

Thanks, I’ll take a look at that list
Ideally it will update the file icons on new file and folder expand


#8

I’ve looked into the events and most of the are command events and occur from user hotkeys and are not notifications of things that did happen.

The tree-view:directory-modified event covers both file creation and removal, but there’s not event for FileTree folder expand. Anyone have any ideas?