I want to use the combination gggqG
to go to the top of the file and format the whole file from there, so that it fits into my 80 col textwidth border.
But when I do, vim ignores my markdown headers. So I want basically to ignore all markdown headers for formatting. How can I do that?
before
#this is a h1
this is the text of the file i want
to reformat
after
#this is a h1 this
is the text of the file
i want to reformat
The word this
was moved to the header.
formatoptions=t,a