Atom: How to set icon for custom file type?

Created on 6 Aug 2017  路  10Comments  路  Source: file-icons/atom

Hello,

I use a template file (*.tpl) which contains HTML code. How is possible to set a HTML icon for that file (tpl)?

Thank you

question

All 10 comments

Add this to your user config's customFileTypes setting:

~cson
"text.html.basic": [
"tpl"
]
~

You can find more info on adding custom filetypes here.

Thank you :)

You're welcome!

Please one more question, can I ask you? If I want another files its like:

    customFileTypes:
      "text.html.basic": [
        "tpl"
      ]
      "source.cpp": [
        "mdl"
      ]

? Because at mdl file extension it doesn't show CPP icon.

Yes, that should be working. What is it showing instead?

Its some kind of blue "onion" http://i.imgur.com/gXRelid.jpg That file is Perl, but if I write source.perl or source.cpp always there is that "onion", and logo of Perl is Camel, so I don't understand.

Yes, that's the logo of the Perl Foundation. =) I'm guessing the file has a modeline or a hashbang inside it, am I correct? Something that looks like this?

~~~perl

!/usr/bin/env perl

-- perl --

vim: set syntax=perl:

~~~

If it does, that's to be expected. It's the author's way of identifying the file as containing Perl code. If you create a new .mdl file and save it elsewhere, you'll find it has the C++ icon like you expect.

Ah yes, I understand :) yes I have #!/usr/bin/env perl :) ok so it is logo of Perl Foundation, because I didn't know it, but now I know :) Thank you very much :)

BTW, it's a play on words. The onion refers to Pearl onions. =)

Haha interesting :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MaxGiting picture MaxGiting  路  4Comments

Nearoo picture Nearoo  路  4Comments

fepegar picture fepegar  路  4Comments

alejandronespereira picture alejandronespereira  路  9Comments

libbyschuknight picture libbyschuknight  路  9Comments