Let's say I have these lines:
a
# c
b
## d
and i want to insert # on a line starting with a # so that I get this:
a
## c
b
### d
I was not able to find anything in the vim help, but I was able to get this far: g/^#/ - what should come after the second /?
#but^#.:substitutereally is the way to go. Beside that wasn't my question. My question is: what's your exact need? Is it about refactoring markdown? – Luc Hermitte Aug 17 '17 at 07:15global + normal, though. What's interesting in the other question, is that the objective is more extensively covered. For instance, I provide a non trivial way to refactor headings while leaving shebangs and# commentsintact in code snippets when that matters. – Luc Hermitte Aug 17 '17 at 22:26