I want to wrap my text to 79 characters, I do that using the gq
command. For most filetypes this works just fine and indents following lines.
With Markdown, however, it does the following:
The pattern seems to be that only the second line gets indented.
This is not really nice as it then parses differently. For reStructuredText (:set ft=rst
) it works just fine with longer lines:
What would I have to do to get the same results in Markdown as in reStructuredText?
noautoindent
. The funny thing is that once I do:set ft=rst
and then:set ft=markdown
, thegqip
works as expected. It doesn't do before. So somehow back-and-forth in the filetype improves the situation. But either way I havenoautoindent
.:set ai fo+=q
and appropriate'comments'
forgq
to make a hanging indent.fo=tcq
. Andcomments
isfb:*,fb:-,fb:+,n:>
before and after therst
-markdown
switching. So I guess that is not the trick.