vim-pandoc-syntax icon indicating copy to clipboard operation
vim-pandoc-syntax copied to clipboard

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

Open matthew-brett opened this issue 4 years ago • 4 comments

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?

matthew-brett avatar Apr 21 '20 13:04 matthew-brett

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.

alerque avatar Apr 21 '20 13:04 alerque

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.

matthew-brett avatar Apr 21 '20 14:04 matthew-brett

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.

alerque avatar Apr 21 '20 14:04 alerque

See: #326 as a ranging shot.

matthew-brett avatar Apr 21 '20 15:04 matthew-brett