I have a custom SPICE (electronics) syntax highlighting for gEdit, it's working, but I would like to modify the highlighting for variables (and I don't know how to). What I have now is this:
<context id="variables" style-ref="string">
<match extended="true">
(\s[^\s><&(){};,=/+\-*\^]+|
(?![({])\s*[^\s><&(){};,=/+\-*\^]+)
\s*(\=)(?!(\s*\=))
</match>
</context>
The parameters (variables) are defined like this:
.param Value=3.14
and, with the above code, "Value=" is highlighted, but I would like to omit the "=" from being coloured. I have tried (?!\=)
on the last row, after 's*
, plus a few combinations but... nothing.
In a more detailed way:
- the parameters are defined by a mandatory first
.param
or.params
(this is solved) - they cannot have spaces or any character like these -- [^\s><&(){};,=/+-*\^] -- inside their namings (solved)
- they must have at least one space before to not "mingle" with the previous characters (solved)
- the above condition has the "(" and "{" exceptions (solved)
- they can have spaces between them and "=" (solved)
Please bear in mind that I have very little knowledge about PCRE, this is probably childish-looking but I don't mind as long as it's working. What I have now is done by too many trials-and-errors.