tpope / vim-markdown

Vim Markdown runtime files
1.22k stars 191 forks source link

Make formatting with `gq` respect headings #211

Open matrdr opened 5 months ago

matrdr commented 5 months ago

When you try to format your whole document with gq it usually happens that the heading and the text from the next line get joined into one line. This is because the text usually starts directly in the line after the heading instead of using a blank line in between.

The following StackExchange issue has a neat and simple solution for this: https://vi.stackexchange.com/a/6034/40145

Maybe this could be implemented to this script. Maybe it is also too hacky / too much of a workaround for being in this official script. I would also understand that argumentation.