You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helix/helix-core/src
Vince Mutolo f9baced216
add reflow command (#2128)
* add reflow command

Users need to be able to hard-wrap text for many applications, including
comments in code, git commit messages, plaintext documentation, etc. It
often falls to the user to manually insert line breaks where appropriate
in order to hard-wrap text.

This commit introduces the "reflow" command (both in the TUI and core
library) to automatically hard-wrap selected text to a given number of
characters (defined by Unicode "extended grapheme clusters"). It handles
lines with a repeated prefix, such as comments ("//") and indentation.

* reflow: consider newlines to be word separators

* replace custom reflow impl with textwrap crate

* Sync reflow command docs with book

* reflow: add default max_line_len language setting

Co-authored-by: Vince Mutolo <vince@mutolo.org>
2 years ago
..
increment Replace tendril with smartstring 2 years ago
auto_pairs.rs Configurable auto pairs (#1624) 2 years ago
chars.rs Temporarily turn on unicode-lines 2 years ago
comment.rs Fix toggle_comments command on multiple selections (#1882) 2 years ago
config.rs Add support for local language configuration (#1249) 2 years ago
diagnostic.rs feat(lsp): configurable diagnostic severity (#1325) 3 years ago
diff.rs Fix Clippy lints in tests (#1563) 2 years ago
graphemes.rs Optimize rendering by using Ropey::byte_slice 2 years ago
history.rs fix typos (#2304) 2 years ago
indent.rs Indentation rework (#1562) 2 years ago
lib.rs add reflow command (#2128) 2 years ago
line_ending.rs Add (prev) paragraph motion 2 years ago
macros.rs Split parts of helix-term into helix-view. 4 years ago
match_brackets.rs Fix match brackets comment (#1346) 3 years ago
movement.rs Remove usage of format ident feature from tests (#2028) 2 years ago
object.rs add select_next_sibling and select_prev_sibling commands (#1495) 2 years ago
path.rs fix typos (#2304) 2 years ago
position.rs Fix tab rendering to use dynamic tab width 2 years ago
register.rs Show infobox with register contents 2 years ago
search.rs Jump to the next number on the line before incrementing (#1778) 2 years ago
selection.rs Fix Clippy lints in tests (#1563) 2 years ago
shellwords.rs Open files with spaces in filename, allow opening multiple files (#1231) 3 years ago
state.rs Reduce State use a bit further 3 years ago
surround.rs Fix tests for surround primitives 2 years ago
syntax.rs add reflow command (#2128) 2 years ago
test.rs Remove usage of format ident feature from tests (#2028) 2 years ago
textobject.rs Add `m` textobject to select closest surround pair 2 years ago
transaction.rs core: transaction: Resolve some TODOs 2 years ago
wrap.rs add reflow command (#2128) 2 years ago