aboutsummaryrefslogtreecommitdiff
path: root/book/src
diff options
context:
space:
mode:
authorSzabin2023-05-19 23:31:39 +0000
committerGitHub2023-05-19 23:31:39 +0000
commit70e4cdbd8e3f0b2a1c5bd2e1cb1c1ec537bdca04 (patch)
treea91ae30708b8120b2f414da727be152ceacddff6 /book/src
parente4a9bec562906770560f442555cc67ec58753c01 (diff)
Add command to merge non-consecutive ranges (#7053)
* Add command for merging non-consecutive ranges * Add `merge_selections` command to book * Simplify `merge_ranges` Heeded the advice of @the-mikedavis to stop iterating over all ranges and simply merge the first and the last range, as the invariants of `Selection` guarantee that the list of ranges is always sorted and never empty. * Clarify doc comment of `merge_ranges`
Diffstat (limited to 'book/src')
-rw-r--r--book/src/keymap.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/book/src/keymap.md b/book/src/keymap.md
index f530bf6c..e8b140c8 100644
--- a/book/src/keymap.md
+++ b/book/src/keymap.md
@@ -111,7 +111,8 @@
| `s` | Select all regex matches inside selections | `select_regex` |
| `S` | Split selection into sub selections on regex matches | `split_selection` |
| `Alt-s` | Split selection on newlines | `split_selection_on_newline` |
-| `Alt-_ ` | Merge consecutive selections | `merge_consecutive_selections` |
+| `Alt-minus` | Merge selections | `merge_selections` |
+| `Alt-_` | Merge consecutive selections | `merge_consecutive_selections` |
| `&` | Align selection in columns | `align_selections` |
| `_` | Trim whitespace from the selection | `trim_selections` |
| `;` | Collapse selection onto a single cursor | `collapse_selection` |