vim-pandoc / vim-pandoc-syntax

pandoc markdown syntax, to be installed alongside vim-pandoc
MIT License
425 stars 61 forks source link

Block quotes reflow - should this add > to each line? #325

Open matthew-brett opened 4 years ago

matthew-brett commented 4 years ago

Please forgive me if this is the wrong issue tracker.

Consider this long line in a .md file:

> Here is a long quote where I type for many characters overflowing my line length limit of 79 characters.

In default Pandoc markdown, when I reflow this line (gqap) - I get:

> Here is a long quote where I type for many characters overflowing my line
length limit of 79 characters.

Notice the new line at the beginning of the second line. I know that the whole thing is still a valid block quote, according to https://daringfireball.net/projects/markdown/syntax#blockquote. But, in other modes, such as standard markdown mode (rather than pandoc markdown), or rmd mode, I get:

> Here is a long quote where I type for many characters overflowing my line
> length limit of 79 characters.

I personally find this neater. Should this also be the behavior for Pandoc markdown?

alerque commented 4 years ago

Yes, I would prefer to see that be the behavior when in hard wrap mode and/or reflowing lines. I'd be happy to accept a PR that made this happen.

matthew-brett commented 4 years ago

Thanks - I'm afraid I would not be useful for the task of a PR - I have done some vim hacking, but I wouldn't know where to look for the reflow rules.

alerque commented 4 years ago

That's okay, but I probably won't get to it myself soon. We can hope somebody else comes along and wants to contribute.

I don't know how to do it off the top of my head either, but I believe I've seen things such as email formatting plugins that reflow using the > line prefix, so I know it's possible. I'd find some other plugin than does something similar for another format and poke around for how they accomplished it.

matthew-brett commented 4 years ago

See: #326 as a ranging shot.