How do I make a default syntax by filetype in Atom text editor?

This is now in Atom core, you don’t need that file-types package any more.

Where I work, we use .phl for a certain kind of PHP file. To tell Atom about this, first find the language’s Scope Name (e.g. text.html.php ), then edit config.cson like so:

core:
    customFileTypes:
      "text.html.php": [
        "phl"
      ]
    themes: [
// snip

You can find this file at ~/.atom/config.cson, or from the Settings window click the “Open Config Folder” button.

It’s easy to get wrong, as evidenced by the many errors people made on the GitHub issue for the feature.

Leave a Comment

File not found.