nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] About highlighting..


From: VDR User
Subject: Re: [Nano-devel] About highlighting..
Date: Sun, 21 Aug 2011 15:56:03 -0700

On Sun, Aug 21, 2011 at 2:47 PM,  <address@hidden> wrote:
>> First, is the highlighting supposed to identify functions which have
>> no closing bracket?  And if so, is it broken?  Is it turned off by
>> default and would need to be turned on?  And example (bash):
>>
>> some_function () { echo "this is fine"; }
>> some_function () { echo "this is NOT fine";
>
> This is not supported by nano's syntax highlighting engine. The rules can 
> only highlight a pattern or everything between two patterns.
>
> color black,red "[][(){}]"
> color yellow start="\[" end="\]"
> color yellow start="\(" end="\)"
> color yellow start="\{" end="\}"
>
> If you place that at the top of the syntax file and then remove
> all brackets from the existing rule you will see that it highlights your 
> sample code just fine and catches open brackets. The first problem is that it 
> highlights everything between the brackets with the bracket color. The second 
> problem is that it doesn't work with nested brackets.
>
> foo{ bar{}
>
> It catches the open brackets until you type the final closing bracket, at 
> which point the first opening bracket matches with the closing bracket and 
> everything in between is highlighted yellow.

Hi.  Thanks for your quick reply!  So _should_ nano highlighting
support nested brackets then?  It seems like a completely sane
expectation imo but I wonder if there are any good arguments against
it?

Best regards,
Derek



reply via email to

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