I want my .ejs files to have html syntax, however, it always opens the files as Plain Text.
In sublime you can choose "Open all with current extension as..." then choose your syntax.
I see that you can change the syntax in the left bottom corner
How do you open files with a certain type with a specific syntax?
To format all lines from a file, just use: Ctrl+Shift+F .
You can open the Settings View by navigating to Edit > Preferences (Linux), Atom > Preferences (macOS), or File > Settings (Windows).
We are archiving Atom and all projects under the Atom organization for an official sunset on December 15, 2022.
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.
Edit: since the time I wrote this answer, this functionality has been added to Atom core, see this answer for details.
(https://atom.io/packages/file-types)
It does exactly what the title question asks for: you can define new file extensions for existing languages with a simple edit of the config.cson
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With