----- Original Message -----
From: Wilbert Berendsen <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 03, 2000 8:14 AM
Subject: Re: Vim syntax highlighting file
> Tuesday at 2:17pm, Simon Brackenboro wrote:
>
> > perhaps we should should decide on an extension for all bbmenu files or
> > a comment on the first line like in bash. Then autodection can easily be
done.
>
> isn't it possible to just test using a simple regexp on the first, say, 60
> lines, to find a line matching something like this:
yes it is, but generally autodection is done at most in the first 5 lines or
on extension (I imagine this is for speed).
Perhaps we could test the last 5 lines instead, as the first lines are more
likey to have comments.
a better regexp would probably be something like,
\[\(end\|begin\|exec.\)\]\s* etc..
What do peoples menu files tend to end with ([end])?
Would this work for you ?
> \[.*?\]\S\(.*?\)(\S$|\{.*?\}$)
>
> where \S stands for whitespace (dont know much about vi). It matches a []
> () pair and a [] () {} trio.
>
> IMHO it is not elegant to require a special formatted comment line to
> enable autodetection.
I agree.
> grtz
> --
> Wilbert Berendsen. Meet me at http://www.xs4all.nl/~wbsoft
> "Economics is the study of what people do when nothing
> more important than money is at stake." -- RMS 23-11-1999
>