nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] About highlighting..


From: alpha
Subject: Re: [Nano-devel] About highlighting..
Date: Sun, 21 Aug 2011 15:47:54 -0600

On Sun, 21 Aug 2011 13:08:15 -0700
VDR User <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.




reply via email to

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