Loading ...
Sorry, an error occurred while loading the content.
 

LilyPond-syntax

Expand Messages
  • Heikki Johannes Junes
    LilyPond is a music typesetting program. LilyPond input is plain text. To introduce more LilyPond, please visit http://www.lilypond.org.This is the first
    Message 1 of 8 , Oct 29, 2002
      LilyPond is a music typesetting program. LilyPond input is plain text.
      To introduce more LilyPond, please visit http://www.lilypond.org

      This is the first patch considering LilyPond input. It contains the
      syntax-file, which practically have <:> slur matching and note name
      matching as a language-specific features. It follows the practices of
      other syntax files.

      LilyPond syntax is in a developing state, hence the syntax matching file
      (lilypond.vim) was constructed in such manner that it contains the most
      common parts. This idea was followed in tex.vim -syntax-file.

      To test the patch, look for example the following file (.ly.txt -> .ly):

      http://lilypond.org/development/input/mutopia/J.S.Bach/out-www/wtk1-fugue2.ly.txt

      The patch to "filetype.vim" and the syntax-file "lilypond.vim" are as an
      attachments.

      It is worth mentioning, "lilypond.vim" was just recently included to
      LilyPond-CVS for this purpose. So, the file in "Latest:" -section points
      to "lilypond.vim" in LilyPond-CVS.

      Just for fun,

      Heikki Junes
    • Heikki Johannes Junes
      ... Where should I address the patch mentioned above? In the vim-manual it was written that there should be some discussion before new syntax-file is merged to
      Message 2 of 8 , Nov 6, 2002
        On Tue, 29 Oct 2002, Heikki Johannes Junes wrote:
        >
        > The patch to "filetype.vim" and the syntax-file "lilypond.vim" are as an
        > attachments.
        >
        > Heikki Junes
        >

        Where should I address the patch mentioned above? In the vim-manual it was
        written that there should be some discussion before new syntax-file is
        merged to the development tree. Where should the discussion take place?

        Heikki Junes
      • Nikolai :: lone-star :: Weibull
        ... Bram usually responds pretty promptly about these things. He hasn t responded to the above mails? usually you give a pattern and he figures out where to
        Message 3 of 8 , Nov 6, 2002
          On Wed, 06 Nov 2002 17:04:04 +0000, Heikki Johannes Junes wrote:
          > On Tue, 29 Oct 2002, Heikki Johannes Junes wrote:
          > >
          > > The patch to "filetype.vim" and the syntax-file "lilypond.vim" are as an
          > > attachments.
          > >
          > > Heikki Junes
          > >
          >
          > Where should I address the patch mentioned above? In the vim-manual it was
          > written that there should be some discussion before new syntax-file is
          > merged to the development tree. Where should the discussion take place?
          >
          Bram usually responds pretty promptly about these things. He hasn't
          responded to the above mails? usually you give a pattern and he figures
          out where to put it in filetype.vim, but otherwise it works fine to send
          it to vim-dev. oh well.

          --
          ::: name: Nikolai Weibull :: aliases: pcp / lone-star :::
          ::: born: Chicago, IL USA :: loc now: Gothenburg, Sweden :::
          ::: page: http://pcppopper.org/ :: top ref: google "pcp rocks" :::
          main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
        • Kontra, Gergely
          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
          Message 4 of 8 , Nov 8, 2002
            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.

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

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

            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...

            Gergo
            +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
            | Email: kgergely@..., kgergely@... |
            | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
            +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
            .
            Magyar php mirror es magyar php dokumentacio: http://hu.php.net
          • Heikki Johannes Junes
            ... 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)+
            Message 5 of 8 , Nov 8, 2002
              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 lilypond-devel@....
              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
            • Heikki Johannes Junes
              ... Fixed cesis. To make this email smalle, pick lilypond.vim, e.g., at http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ I cannot figure out a
              Message 6 of 8 , Nov 8, 2002
                > 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.

                Fixed cesis. To make this email smalle, pick lilypond.vim, e.g., at

                http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/

                I cannot figure out a correct situation in which pitch is at EOF.

                In general, there was one difficulty that levels of '\(' '\)' were limited
                to some rather small number. So, at the highest level one has to avoid
                slurs.

                Heikki Junes
              • Kontra, Gergely
                Compiling, running lilypond. Well, I think a new option can be introduced to vim to tell vim how to execute the current buffer. This case executing can be
                Message 7 of 8 , Nov 11, 2002
                  Compiling, running lilypond.

                  Well, I think a new option can be introduced to vim to tell vim how to
                  'execute' the current buffer. This case 'executing' can be starting xdvi
                  to view the result, and of course, 'makeprg' can be used to compile
                  output, as you did in your vimrc.

                  >I cannot figure out a correct situation in which pitch is at EOF.
                  It is not a parser, it is a syntax file.
                  Assume you run vim, and type :ene|se ft=lilypond<CR>
                  and start typing...

                  Gergo
                  +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
                  | Email: kgergely@..., kgergely@... |
                  | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
                  +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
                  .
                  Magyar php mirror es magyar php dokumentacio: http://hu.php.net
                • Heikki Johannes Junes
                  ... Sounds appealing. IMO, the current idea to separate syntax and commands is a good one. In additional to the syntax-file, which does not change so often,
                  Message 8 of 8 , Nov 11, 2002
                    > Well, I think a new option can be introduced to vim to tell vim how to
                    > 'execute' the current buffer. This case 'executing' can be starting xdvi
                    > to view the result, and of course, 'makeprg' can be used to compile
                    > output, as you did in your vimrc.

                    Sounds appealing. IMO, the current idea to separate syntax and commands is
                    a good one. In additional to the syntax-file, which does not change so
                    often, there could be an other file like commands-file which is extension
                    dependent. AFAICS, the set of commands depends on what type of task you
                    are doing. Not always "make" or "view" is needed. Even better, this set of
                    commands could be included to the menu in gvim.

                    BTW, viewing is already in vimrc. Any ideas how to develope this
                    LilyPond vim-mode further are appreciated. Please let you hear about
                    LilyPond-issues in lilypond-dev@....

                    > >I cannot figure out a correct situation in which pitch is at EOF.
                    > It is not a parser, it is a syntax file.
                    > Assume you run vim, and type :ene|se ft=lilypond<CR>
                    > and start typing...

                    Ok, fixed. Remember, however, the minimal syntax to produce one note in a
                    score to paper is "\score{\notes{c}}".

                    The idea was to contribute only the syntax-file, but not commands
                    corresponding to LilyPond -compiling etc.

                    Heikki Junes
                  Your message has been successfully submitted and would be delivered to recipients shortly.