change request of vim syntax file 'runtime/syntax/chordpro.vim'

10 views
Skip to first unread message

nibo

unread,
Dec 31, 2024, 4:29:13 AM12/31/24
to vim...@vim.org
Hello there,

I reached out to the maintainer Niels Bo Andersen (ni...@niboan.dk) of
the chordpro syntax file in `runtime/syntax/chordpro.vim`. I sent that
email on 12/1/24 and didn't get a response yet. According to the
contributing guideline at
`https://github.com/vim/vim/blob/master/CONTRIBUTING.md#syntax-indent-and-other-runtime-files`
I now post here in the mailing list.

This is the email I sent to Niels Bo Andersen:

Hello Niels Bo Andersen,

I'm currently writing an implementation of the chordpro standard and am
using vim for editing. When I edit a text file with the file extension
'.cho' the chordpro syntax highlighting applies to my file but one word
doesn't get highlighted which probably should.

Based on the documenation at
'https://chordpro.org/beta/directives-define/#defining-chords-for-keyboard-instruments'
you can define a chord for a keyboard instrument like this:

{define: D keys 0 4 7}

The keyword 'keys' does not get highlighted. I think it should get
highlighted. If you want to change that feel free to have a look at the
patch file I'll attach.

Have a nice day,

Robin
chordpro-syntax-change.diff

Christian Brabandt

unread,
Dec 31, 2024, 5:20:33 AM12/31/24
to vim...@googlegroups.com, vim...@vim.org
> diff --git a/runtime/syntax/chordpro.vim b/runtime/syntax/chordpro.vim
> index 41a0a1e9d..3f9ac2a9a 100644
> --- a/runtime/syntax/chordpro.vim
> +++ b/runtime/syntax/chordpro.vim
> @@ -104,7 +104,7 @@ syn match chordproStandardMetadata /instrument\.description/ contained
> syn match chordproStandardMetadata /user\.name/ contained
> syn match chordproStandardMetadata /user\.fullname/ contained
>
> -syn keyword chordproDefineKeyword contained frets fingers
> +syn keyword chordproDefineKeyword contained frets fingers keys
> syn match chordproDefineKeyword /base-fret/ contained
>
> syn match chordproArgumentsNumber /\d\+/ contained

Thanks, I include it.


Thanks,
Christian
--
An apple a day makes 365 apples a year.
Reply all
Reply to author
Forward
0 new messages