It is possible to increment all refs in selected region with this command:
:'<,'>sno/[^\(\d\+\)]/\='[^'.(submatch(1)+1).']'/g
Where sno
(:help :snomagic
) allows to drop backslashes before brackets.
- Add reference.
- Select all the text after reference (excluding footnotes). You can set a mark just before footnotes to do this easily.
- Increment refs in selection.
- Add footnote.
- Select all footnotes below.
- Increment refs in selection.