Humble patch submission

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Humble patch submission

Christ van Willegen
Hi,

I've been using Lilypond for a longt ime now, and have recently run
into (also) editting them with Vim. I've done that in the past, but am
now starting to use Vim for editting Lilypond files more often, so I
wanted to enable syntax coloring and keyword completion.

I got that working, but I found a small problem in the vim syntax file
that is included. It turns out that if I write g~g in a .ly file, the
second g is not highlighted as a note name, because Vim sees this as
one (key) word. I was able to fix that using the patch below. Please
consider including it in the Lilypond distribution.

I also fixed a spelling error while I was at it :-)

I contacted the original author, but the email address that was listed bounced.

Regards,

Christ van Willegen
$ diff lilypond.vim /usr/share/lilypond/2.18.2/vim/syntax/lilypond.vim
28c28
< " Match also parethesis of angle type
---
> " Match also parentheses of angle type
55a56,58
>
> " ~ is not a keyword character
> setlocal isk-=126

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Humble patch submission

Simon Albrecht-2
Hello Christ,

thanks for the suggestion. The correct way to do this would be sending
an email to the bug list, as an enhancement request with the patch included.

Note that omitting the space after ~ is against semi-official style
policies for LilyPond code. It improves readability and understanding of
the technical concepts to write g~ g instead of g~g.

Best, Simon

On 27.06.19 09:37, Christ van Willegen wrote:

> Hi,
>
> I've been using Lilypond for a long time now, and have recently run
> into (also) editting them with Vim. I've done that in the past, but am
> now starting to use Vim for editting Lilypond files more often, so I
> wanted to enable syntax coloring and keyword completion.
>
> I got that working, but I found a small problem in the vim syntax file
> that is included. It turns out that if I write g~g in a .ly file, the
> second g is not highlighted as a note name, because Vim sees this as
> one (key) word. I was able to fix that using the patch below. Please
> consider including it in the Lilypond distribution.
>
> I also fixed a spelling error while I was at it :-)
>
> I contacted the original author, but the email address that was listed bounced.
>
> Regards,
>
> Christ van Willegen
> $ diff lilypond.vim /usr/share/lilypond/2.18.2/vim/syntax/lilypond.vim
> 28c28
> < " Match also parethesis of angle type
> ---
>> " Match also parentheses of angle type
> 55a56,58
>> " ~ is not a keyword character
>> setlocal isk-=126
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user