nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] 2.3.2pre3


From: Chris Allegretta
Subject: Re: [Nano-devel] 2.3.2pre3
Date: Tue, 22 Jan 2013 03:22:20 -0500

Unfortunately that was by design - is this really prevalent in all of
our configs that we should repeatedly highlight the same text in
different colors?  Of course there's the easy route of:

Index: doc/syntax/sh.nanorc
===================================================================
--- doc/syntax/sh.nanorc (revision 4546)
+++ doc/syntax/sh.nanorc (working copy)
@@ -5,11 +5,11 @@
 header "^#!.*/(ba|k|pdk)?sh[-0-9_]*"
 icolor brightgreen "^[0-9A-Z_]+\(\)"
 color green 
"\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
+icolor brightred "address@hidden"
 color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
 color green "-[Ldefgruwx]\>"
 color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
 color brightblue
"\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
-icolor brightred "address@hidden"
 color cyan "(^|[[:space:]])#.*$"
 color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
 color ,green "[[:space:]]+$"

Looking at just using this on the configure script it seems we have a
ways to go in terms of making this regex produce reasonable-looking
highlighting anyway.

Let me just say the obvious here: this is really really hard to get
right.  The win of that commit was to solve this awfulness (using an
example int the same language):

# Check out this "pretty" comment

I'd intended to implement an "overlap" option (even the commit says
so) to allow overrlapping higlights of later rules where simple
swapping of rule ordering wouldn't fix the core issue.  I guess we'll
have to decide where to go on how many highlights have broken with
this commit.  Thoughts?

On Tue, Jan 22, 2013 at 2:37 AM, Mike Frysinger <address@hidden> wrote:
> On Tuesday 22 January 2013 01:59:42 Chris Allegretta wrote:
>> Hmm, do you mean 4566?  Thats where I missed with wordbounds and added
>> the new flag.  Is your setup not setting GNU_WORDBOUNDS now?  I had
>> that happen once until I did a make clean, but it's possible it is
>> broken subtly (or knowing me, un-subtly).
>
> no, i meant 4547.  i could be hitting a different issue.
>
> simple to reproduce:
>         - nano test.sh
>         - type "${var}"
>
> before 4547, all of ${var} would be a reddish color.  now it doesn't highlight
> at all.
> -mike



reply via email to

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