editors/nano problem with nanorc regexps

Jacek Wotka cn at team-fatal.com
Sat Jun 26 08:10:23 PDT 2004


hi,

after some time i discovered that nano could do syntax
highlighting, so i tried to do my own nanorc-file, but
when i wanted to match c++ keywords (the pattern was:
"(int|short|do|class|...)") i came across the problem that they
they were matched inside other words aswell, example:
 someclass dosomething(); would highlight class and do
by looking into the sample-file i noticed \< and \>
around the actual pattern: "\<(int|short|do|class|...)\>".
this was supposed to tell nano only to highlight these
words, if they are not followed or preceded by word-
characters. however it did not work on my system so i
tested the same nanorc on a linux system, and it worked.

to make the story short ;):
i don't now much about nanos design, never looked into
the code, but i think the root of this "bug" could be
a different implementation of regexps on (free)bsd in
contrast to gnu/linux. i don't know if there's an
alternative way to express what "\<" and "\>" should do,
if there is (i didn't find one), then how does it look
like. if there isn't, i am asking you (maintainer or
someone else), if it can be fixed. (maybe by importing
the gnu implementation as a port, or something? if this
seems a crazy suggestion, then i'm sorry ;))

thanks in advance

(i'm not subscribed to ports@)



More information about the freebsd-ports mailing list