• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

language-awk

AWK language support in Atom.
  • #language
  • #awk
  • #grammar
c-steiner
0.1.12 16,699
17
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

AWK-Script language support in Atom

apm

Adds syntax highlighting to awk scripts in Atom.

Preview

Grammar Preview

Installation

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:

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:

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

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by