atom-hard-wrap icon indicating copy to clipboard operation
atom-hard-wrap copied to clipboard

Character count is started from selection

Open asbjornu opened this issue 9 years ago • 0 comments

When trying to wrap the last line of this Markdown list by starting my selection at "After":

- Subsequent lines should be wrapped at 72 characters.
  - After editing a paragraph, you can re-wrap it by pressing escape, ensuring the cursor is within the paragraph and typing <code>gqip</code>.

It ends up like this:

- Subsequent lines should be wrapped at 72 characters.
  - After editing a paragraph, you can re-wrap it by pressing escape, ensuring the
cursor is within the paragraph and typing <code>gqip</code>.

After wrapping, the word "the" is overflowing the 80 character line length by two characters. If I instead start the selection on the start of the line, I get this:

- Subsequent lines should be wrapped at 72 characters.
  - After editing a paragraph, you can re-wrap it by pressing escape, ensuring
  - the cursor is within the paragraph and typing <code>gqip</code>.

While the above is cool in terms of built-in intelligence on preserving the - and indentation, this leads to breaking my Markdown list. While it would be awesome if Markdown was understood, I don't expect that from a plugin like this, so instead it would be nice if I could just start the selection after the - character and then have it wrapped at the 80 character line length counted from the start of the line instead of from the start of the selection.

It would then of course be incredible if the wrapped text was indented to where my selection starts.

asbjornu avatar Jan 28 '16 07:01 asbjornu