Re: [gedit-list] Meaning of match-empty-string-at-*?



Johan Tibell wrote:
What exactly is the meaning of the match-empty-string-at-beginning/end
in the keyword-list element of gtksourceview .lang files? I'm trying
to match words on the form $identfier, this works but I'm unsure of
why:
match-empty-string-at-beginning/end adds \b at the beginning/end of the regex: if your keywords are foo, bar and baz, the regex that is matched is \b(foo|bar|baz)\b if match-empty-string-at-beginning/end are true, while it will be (foo|bar|baz) if they are false. \b means that there should be a word boundary, setting it to FALSE is needed to work around keywords which begin/end with characters which are not considered boundaries.



Also is there a way to indicate what part of a regex match I want
highlighted. For example I would like type names (int, string, void,
etc.) to be highlighted if and only if the appear after a colon (:)
but I don't want the colon to be highlighted.
I don't think this is possible at the moment. I hope it will be adressed in the new highlighting engine that's being worked on.


ciao

   Paolo

_______________________________________________
gedit-list mailing list
gedit-list gnome org
http://mail.gnome.org/mailman/listinfo/gedit-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]