Awk syntax highlighting
johnnilsson / awk-sublime Goto Github PK
View Code? Open in Web Editor NEWAwk syntax highlighting in Sublime Text
License: MIT License
Awk syntax highlighting in Sublime Text
License: MIT License
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 }
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.
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
] /
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 {
}
}
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 !
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.
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);
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.
When escaping characters such as " and > the syntax coloring breaks.
Example:
{
print(""");
#This line has the wrong color
}
{ 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
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.