Open kontrapunktstefan opened 1 month ago
Hey, you cannot change what you typed yourself, that is a limitation of Vim, unfortunately. The best you can do is something like this:
snippet apo "lilypond pitches with apostophes"
`!p
lines = []
for idx, line in enumerate(snip.v.text.splitlines()):
lines.append(" ".join(f"{a}'" for a in line.split()))
snip.rv = "\n".join(lines)
`
endsnippet
You use it like this:
c d e
<tab>
), this will remove the textapo<tab>
or whatever your expand trigger isc' d' e'
.Hope that helps
I have written the following snippet for UltiSnips in Vim. With this snippet I want to add an apostrophe to all lilypond pitches:
When I execute it, however, the text appears twice:
I just want the 2nd line
I've tried snippet 1 "lilypond pitches with apostophes"
but this gives an error: