It is considered good practice that the length of lines in a markdown files do
not exceed a certain character limit (It's a markdownlint rule, at least).
This rule makes particularly sense when editing in vim mode. When each line as shown on the screen
is an actual line in the file, you can navigate between lines with the j, k keys easily. Instead, when editing a super-long line that is wrapped over multiple lines, it is more cumbersome to move the cursor to a certain position using the keyboard only.
After exceeding the N character limit, insert a line break instead of the previous space.
It would be amazing if, in addition to that, there would be a 'reformat' functionality that automatically
re-wraps existing text, similar to gq in vim.
Don't see any as long as this is an optional configurable.
textwidth and type gq natively. puh, this would require an awful lot of additional conditional code to make that work, and I'm unsure if that's really the way for Zettlr.
With regard to the target audience, those people want to have one big long "line" that is actually a paragraph. That being said, the default should remain to soft-wrap the lines without actually inserting new characters. And with regard to the overhead costs, I think that currently this would be much too complicated to implement given the benefits against doing that manually (e.g. in VSCode I also have to hard-wrap manually after 80 cols, and while cumbersome, one gets used to it).
Plus, currently the editor is one behemoth of performance-eater, and I want to put it on a diet before adding more (potentially computationally expensive) code … so while as of now this is not feasible, once the editor is slimmer and faster with regard to loading (hopefully we get there fast!), I'd be happy to implement that or review a PR that does it!
Please feel free to comment on this issue to remind me at a later point (perspectively beginning of 2021) to revisit this.
I see! Thanks for explaining that and I agree that there are way more burning issues.
Honestly, 80 columns/characters per line is outdated anyway (even Linus agrees). I'd argue that the markdownlint defaults are bad, rather than this being functionality that should be added to Zettlr.
With regard to the target audience, those people want to have one big long "line" that is actually a paragraph. That being said, the default should remain to soft-wrap the lines without actually inserting new characters.
Agree. While I try and separate sentences onto individual lines, knowing that MarkDown will merge them into a single para if there's not a newline between them, I wouldn't expect most people to grok that - rather I'd expect them to treat Zettlr like Word, with text wrapping.
An alternate way of implementing this without breaking the line at 'character limit' could be to automagically insert line breaks at fullstops - The resulting content should all output as one para anyway, as long as no line ends in two spaces.
Alright, I'm going to close the issue now, because I'm getting nightmares again when looking at the issue count — but keep it at the back of your head, so maybe someday we will include it!