[Top][All Lists]

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

Re: LilyPond-syntax

From: Heikki Johannes Junes
Subject: Re: LilyPond-syntax
Date: Fri, 8 Nov 2002 12:38:10 +0200 (EET)

On Fri, 8 Nov 2002, Kontra, Gergely wrote:

> Hi!
> See my try!
> I tried something more precise to catch more errors.
> Eg. cesis is a valid pitch in your sintax... and pitch is highlighted
> after you hit a space, if you're at the end of the file.

Here vim-syntax matching works better than that of Emacs! I have made
emacs-mode for lilypond earlier. For examples ([ei]s)+ could match to
(es)+ or (is)+ but not allways to their mixtures. Pitch is highlighted
after a space, because it is encouraged to join pitchandduration (c'4).
That is more concise and also how it is written on the paper.

> I tried to catch standard header variables, like title, composer.
> I tried to use more colors, catch dynamics...

That is how lilypond-emacs-mode works now. See lilypond-cvs-source.

> Well, it is a matter of taste. Maybe the solution is like the ruby
> syntax (there is a switch for 'expensive' syntax).

I'd prefer not to be all-knowing. That is how LaTeX-mode works. The reason
is that the syntax of lilypond has to be updated every time a new feature
appears to the compiler. If the syntax is all-knowing, it is outdated
every time the syntax changes. And the benevolent developers should have
as much playing ground for the syntax development as they need.

> ps: As far, as I remember my try (an old one...)
> Vim's syntax defining functions are not effective for this language :(
> Reason (I think): vim deals with words, lilypond words contain more
> data...

Extensive tests with lilypond vim-syntax has to be done using the
ly-example files found in cvs-development tree. For example, my
vim-6.1.165 did not catch all the delicacy hidden in your try.

Please consider sending incremental patches, i.e., one patch per
bug/feature, against lilypond-cvs-source to address@hidden
Basically, there are lilypond.vim written by me and vimrc (to be copied to
~/.vimrc) which adds some shortcuts for compiling, viewing and
midi-playing the compiled music.

      Heikki Junes

reply via email to

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