Relative Content

Tag Archive for regexvim

Vim syntax and C pointers

I followed this post on vim highlighting and C pointers and was able to get something working out of this. My issue is I would like to make instances bold and the actual value italicized. Something like this:

Vim funtion for substitution of a regex

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.