Strict print width #65
Replies: 3 comments 10 replies
-
Thank you for contribute. |
Beta Was this translation helpful? Give feedback.
-
I had an idea. Print width is ignored to prevent a situation where the last line of a paragraph contains just a single word or two. IMO, this isn't a problem, but how about we do this: Instead of appending the last very short line to the one above (going beyond print width), how about we move a few words from the second last line down to the last line? Example(print width ignored)
(print width honored)
(new method)
How many characters/words of the second last line will be moved into the last one also has to be decided somehow. |
Beta Was this translation helpful? Give feedback.
-
@RunDevelopment in case you haven't seen, there is more discussion of this issue in #168 . I'm glad I'm not the only one who's complaining about this "clever" wrapping behavior. Luckily though, it seems like a user is working on a PR that will allow us to specify a wrapping strategy, and wrapping "normally" as you describe should be one of the options. |
Beta Was this translation helpful? Give feedback.
-
Let me be the first one to start a discussion.
Right now, this plugin ignores the
printWidth
setting (explicitly specified by the user) in some situations. It does this because the end of paragraphs may be very short otherwise which isn't nice visually. See the full explanation with examples here.The purpose of this discussion is to determine whether this plugin should be allowed to ignore the
printWidth
setting for a more visually pleasing result.My opinion on the matter is simple: No, it should not ignore
printWidth
.printWidth
was explicitly set by the user. We can't just ignore that.I would also argue that paragraphs that are randomly longer than the rest look a lot worse than paragraphs ending with a single word.
(

printWidth
ignored)(

printWidth
honored)I would like to point out that the question of where to insert line breaks, is a problem that programs like MS Words, LibreOffice, and LaTeX renders also have to solve, but they can't print beyond the page. How do those programs solve this?
Beta Was this translation helpful? Give feedback.
All reactions