Code Monkey home page Code Monkey logo

language-awk's Introduction

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;
  }
}

language-awk's People

Contributors

c-steiner avatar alhadis avatar bertysentry avatar caleb531 avatar hxxr avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.