New Language



I’m coming from Notepad++ and quite new to all the new terminology.

in Notepad++ there was something called User Defined Languages(UDL), where you specify an extension and some rules to certain characters and it will highlight it.
I’m looking for the same functionality in Atom.

I understand I need to create a new Language Grammer (how?) and create CSS classes with the desired colors.
How do I enforce the rules on the text itself?

For example I have #Field 1 which I want to be @red, I have the sign ¥ where I want it to be @blue, and so forth.

How can it be done?
Any help in any direction will be appreciated.

Thank you.

Importing a UDL

Begin with apm init --help. This tells you that apm init -l can be used to create a language package. I’m not sure if this is sufficient, but because I don’t know what’s lacking it makes no sense to say more at this point :slight_smile: Just ask more questions.


If the language already exists, there may be a language grammar for it. Search for it on If it doesn’t exist already on the website, there may be a TextMate language bundle for it that you can convert by following the instructions.

Creating support for a new language from scratch is a two-step process. You have to create a grammar which tells Atom which text in the language corresponds to which parts of speech or “scopes”. Like for is a keyword in many grammars. After you create the grammar, you need to examine how your theme colorizes the scopes you created for your grammar. If you follow the conventions of other grammars, then your theme may work flawlessly for your new language … or you may need to add customizations in your styles.less.

Creating a Custom Grammar or Language Package

new link: the instructions