[gedit-list] GtkSourceView
- From: Stefan Salewski <mail ssalewski de>
- To: gedit-list gnome org
- Subject: [gedit-list] GtkSourceView
- Date: Tue, 07 Jun 2016 13:24:27 +0200
In the last days I made a color and syntax scheme for Nim language.
http://ssalewski.de/tmp/NEd-SHD.png
https://github.com/ngtk3/NEd/tree/master/src
Generally its was working really fine, and the documentation is also
fine.
For final tuning I tried to use regexes like this:
<!-- Nim identifier, maybe enclosed in ``, starting lower or upper case -->
<define-regex id="nid">(?'a'`?)[a-zA-Z]\w*(\k'a')</define-regex>
That gave me a lot trouble. Is it a known problem that regexes with
back references are problematic? Or is there maybe a better working
notation available? Unnamed back reference with \1 seems to do not work
at all. Of course I can avoid back references when I do use too ored
regexes, one with `` and one without.
To make the scheme more flexible, I tried to apply regexes like
<define-regex id="ind">\s\s</define-regex>
at some locations where I previously used two /s/s or two spaces, but
it was not really working.
One example is
<context id="indent-pat4" style-ref="indent">
<!-- this seems not to work, why?
<match>(?<=(^\w{ind}))(\w{ind})</match>
-->
<match>(?<=(^ ))( )</match>
</context>
My assumption was that it should behave the same.
Last remark: Highlight unmatched bracket seems not to work at all for
GTK 3.18.
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]