retext icon indicating copy to clipboard operation
retext copied to clipboard

Automatically break line at the configured right margin column

Open htmfilho opened this issue 7 years ago • 7 comments

For better readability outside of a markdown editor, it's a good practice to break lines before it crosses the right margin column, which we can define in the preferences window.

image

It would be great to have a new checkbox, close to the "Display right margin at column" field, to enable the automatic line break.

htmfilho avatar Jul 12 '17 15:07 htmfilho

Seems like this was implemented by PR #313

xgouchet avatar Sep 13 '17 08:09 xgouchet

What was implemented is a soft break, not a hard break (the resulting file still contains long lines).

I think it is not what @htmfilho requested.

mitya57 avatar Sep 13 '17 08:09 mitya57

Indeed @mitya57 . The idea is to have a better readability outside of an markdown editor. So the editor would automatically break lines everytime it reaches the right margin.

Is this a desirable feature in retext? I would love to contribute with it.

htmfilho avatar Oct 02 '17 20:10 htmfilho

Yes, a pull request will be welcome!

mitya57 avatar Oct 03 '17 01:10 mitya57

Just to note, some lines cannot be broken, for example imagine a nested list containing a long URL. Some way to indicate lines that should be preserved would be welcome (or treat URLs as unbreakable words).

lofidevops avatar Dec 08 '17 08:12 lofidevops

I would highly appreciate such a feature, too. In fact it would already be nice to have the option to reflow selected text only on demand, e.g. using Ctrl-J like in geany, rather than fully automatically.

jsaul avatar Feb 12 '18 14:02 jsaul

Good to know it's useful! Thanks for your feedback. I'm writing about the subject to make sure it is designed the best way possible. I hope @mitya57 is patient with me because of the time it is taking to move forward with this issue that I proposed to contribute. :-)

htmfilho avatar Feb 12 '18 14:02 htmfilho