Git Product home page Git Product logo

awk-sublime's Introduction

awk-sublime

Awk syntax highlighting

awk-sublime's People

Contributors

aroben avatar johnnilsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

awk-sublime's Issues

# in regex displays as comment

A regular expression with # in it, treats all characters after as if commented rather than treating it as a content of the regular expression.

/#n_proc / { print $0 }

request

Hi,

This is not an issue, but rather a request. I'd like to have the debugger option with gawk added. I tried to attach to a session without success--I'm a novice user of vscode, and hope this doable with just a minor config file.

Thanks for an otherwise awesome editor / plugin.

Escaping quotation marks

Can you check that the escaping of quotation marks is working so that these do not indicate the start of a string?
Screenshot 2023-11-07 at 13 14 40

division operator leads to wrong syntax highlighting

fillrate = 100 * (1 - empty[i] / (NR-1))

pls try this string - synax highlighting is corrupded after division sign
to be more precise the combination of closing square bracket and division sign causes the trouble
] /

Highlighting breaks for some regex inside if condition

First of all thank you for such a great plugin. It really helped me while learning awk. Following is a snippet with parts of the syntax that are highlighted correctly and parts that aren't. I tried debugging the exact problem but I don't know the how the sublime syntax files work.

# works
/\{([^\}]+)\}/

# works
match($0, /\{([^\}]+)\}/) {}

1 {
  # doesn't work
  if (/\{([^\}]+)\}/) {
  }

  # only regex highlighting works
  if (/\{([^\}]+)\}/) {
  }
}

1 {
  # works by removing `([^\}]+)`
  if (/\{\}/) {
  } else {
  }

  # works by removing `(` and `)`
  if (/\{[^\}]+\}/) {
  } else {
  }
}

support for two dimensional array

Two dimensional array is not properly highlighted: (1) the second dimension is not highlighted (2) if used in if clause, anything after the second dimension is not highlighed. Could you fix this ? Many thanks !

Gawk namespaces

Hi. First of all, thanks for all the work that has gone into this package, including the recent updates.

Could the syntax highlighter be updated to include namespaces, as defined since Gawk 5.0? I don't think this update would have a backwards compatibility issue, but would stop the inclusion of namespaces in variables and function names from breaking the syntax highlighter.

The variable and function name syntax that needs to be allowed is of the form namespace::function_name() or namespace::variable_name -- in effect, allowing the use of a pair of colons within a variable or function name.

If the above is not clear, or you have any questions, just let me know. Cheers.

/a=/ Isn't Handled Correctly

I just found out today that you could make awk files, I was under the impression that it was for inline type of usage. So hopefully I can give useful feedback. It is the backslash, alpha, equal, backslash combination that is causing the problem. /a=/

The specific case for the code I am working on was:
sub (/primary=/, "", primary_name);

2014-05-05 09_38_53-untitled - sublime text 2

punctuation.definition.regex.end.awk

end for regex fails when search is for escaped forward slash. Changed line 272 to /(?!/) to look for double forward slash and only use the final one.

Syntax coloring and escaped characters

When escaping characters such as " and > the syntax coloring breaks.

Example:

This line has the correct color

{
print(""");
#This line has the wrong color
}

in-line comments with brackets

{ line[NR] = $0 }  # remember each input line

the comment won't be highlighted, removing the closing bracket will fix it and break the script :p

Sublime Text 2 support?

After downloading this plugin from package control, no AWK entry was available in the syntax dropdown for me. Looking through the commit history a bit, 9422856, where .YAML-tmLanguage was converted to .sublime-syntax, piqued my interest. Sure enough, reverting to the parent commit 7ec7d15 makes it work for me in ST2. It seems like .sublime-syntax only works in ST3.

Was support for Sublime Text 2 dropped intentionally?

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.