nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] Syntax Highlighting


From: Mike Frysinger
Subject: Re: [Nano-devel] Syntax Highlighting
Date: Sat, 14 Nov 2015 00:56:09 -0500

> icolor brightyellow "\<(function)\>"
> icolor brightred "(\$[a-zA-Z0-9_]+)"

it's not a problem, but the paren here are pointless

still note that [a-z] does not match all letters in some locales which is
why i suggested [:alnum:]

> color brightblue "(^)?(([[:space:]]?)+)#.*$"

i don't understand what you're trying to match here

this means match the start, or don't match at the start:
        (^)?
i.e. seems pointless

this means match groups of optional spaces:
        (([[:space:]]?)+)
which is equiv to writing:
        [[:space:]]*

which doesn't seem like what you want to do here ...

> color brightwhite "\".*\""
> color brightwhite "\'.*\'"

do you want to do [^']* instead ?  otherwise, something like:
 var = 'foo' + 'bar'

note: i'm not familiar with powershell syntax ...

also, do you want to add a trailing whitespace highlight as i mentioned
earlier ?
-mike

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]