Atom Packages Directory

a package directory for a text editor of the 21st Century


Install with:
    apm install language-awk

AWK-Script language support in Atom


Adds syntax highlighting to awk scripts in Atom.


Grammar Preview


sh apm install language-awk

or find it in the Packages tab under settings.

Something Special

Ever getting bored by searching your code for “tracing lines” (print debugging) and finally discovering you missed one (naturally after commit)? Me too!

Therefore I put a small matching rule in this grammar. Every line starting with:

printf "[DEBUG]..." # or printf "[DBG]..." # or print "[DEBUG]" # and of course print "[DBG]"

Is scoped as meta.debug and with a little help from Atoms style features something(*) like:

printf "[DBG]=(%s):=[%s]\n", "strvar", strvar

Will be shown as:
Preview Debug

Eye-catching, isn’t it? And finally…
Preview Output

*) Looks cumbersome but you can get it fast & simple using snippets.

Customize / Disable

The debug highlighting is controlled by a view style rules. If you want to set your own debug-marker style just add the following to your styles.less and change the rules to your flavor:

css atom-text-editor::shadow { .meta.debug { background-color: fade(@background-color-warning, 20%) !important; border: 1px solid fade(@background-color-warning, 50%); border-radius: 0.8em; padding-top: 0.1em; padding-right: 0.7em; padding-bottom: 0.1em; padding-left: 0.7em; } }

You don’t like specials? Well, extend your styles.less with this:

css atom-text-editor::shadow { .meta.debug { background-color: initial !important; border: initial; border-radius: initial; padding: initial; } }

Keywords: language, awk, grammar Suggest keywords
Fork me on GitHub