Increase or decrease digit at the end of a line in vim

I have an issue where working with lilypond I annotate bars of music in the source
by appending the comment char ‘%’ with the number corresponding to the bar in the score.

However as I work through the material often adding or removing bars the entire set
of “markers” becomes typically becomes offset, requiring me to individual traverse
the lines and correct them.

I would like to find a way to quickly augment or decrease a set of the “markers” with
a keystroke or by command or by function of lines that are highlighted within visual mode.

Here is an example:

    clef "bass" numericTimeSignaturetime 4/4 key es major
    transposition c | % 1
        R1
        repeat volta 2 { | % 2
                        as4.  as'16  as16  as4.
                        d,16  c16 | % 3
                        bes4  c8  as4 r4  es16
                        f16  | % 4
                        g4.  d4  g4. | % 5
                     as1 | % 6 
                                     }
          as8  as8 r8  as8 8 8 r8 8 | % 7
          as8  as8 r8  as8 8 8 r8 8 | % 8
                g4.  d4  g4. | aes1
          as,8  as8 8  as8 8 8 8 8 | % 7
          as8  as8 8  as8 8 8 8 8 | % 8

You can see that ‘% 1’ doesn’t correspond to the first bar.¹ How would I increase it along with all the other markers.


1: If you
are looking at the content of the next bar as the first bar, the way that
you would see the bar number on the staff, however I read it, ‘| % 1’, as saying “end of bar 1”.