Adds syntax highlighting to awk scripts in Atom.
apm install language-awk
or find it in the Packages tab under settings.
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:
Eye-catching, isn't it? And finally...
*) Looks cumbersome but you can get it fast & simple using snippets.
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;}}
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.