I want substitute some pitches in a lilypond file. I would like to change for example the line
c cis d2. disis4 d8 beses16 fes64 gis aes16
to
c' cis' d'2. disis'4 d'8 beses'16 fes'64 gis' aes'16
I can do this with
:s/([a-g](is|es){0,2})(('|,')*)(s|[0-9]{1,2}|>)/1'35/g
I would like to integrate this substition in a vim function. But I don’t know, how I cound do this.
I tip, how to write the function
Stefan Thomas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.