kakoune/doc/pages
Johannes Altmanninger c2ab5d4694 Allow to undo and redo selection changes
From the issue:

> It often happens to me that I carefully craft a selection with multiple
> cursors, ready to make changes elegantly, only to completely mess it
> up by pressing a wrong key (by merging the cursors for example). Being
> able to undo the last selection change (even if only until the previous
> buffer change) would make this much less painful.

Fix this by recording selection changes and allowing simple linear
undo/redo of selection changes.

The preliminary key bindings are <c-h> and <c-k>.
Here are some other vacant normal mode keys I considered

	X Y
	<backspace> <minus>
	# ^ =
	<plus> '

unfortunately none of them is super convenient to type.  Maybe we
can kick out some other normal mode command?

---

This feature has some overlap with the jump list (<c-o>/<c-i>) and
with undo (u) but each of the three features have their moment.

Currently there's no special integration with either peer feature;
the three histories are completely independent.  In future we might
want to synchronize them so we can implement Sublime Text's "Soft
undo" feature.

Note that it is possible to restore selections that predate a buffer
modification. Depending on the buffer modification, the selections
might look different of course. (When trying to apply an old buffer's
selection to the new buffer, Kakoune computes a diff of the buffers
and updates the selection accordingly. This works quite well for
many practical examples.)

This makes us record the full history of all selections for each
client. This seems wasteful, we could set a limit. I don't expect
excessive memory usage in practice (we also keep the full history of
buffer changes) but I could be wrong.

Closes #898
2022-09-02 02:59:47 +02:00
..
buffers.asciidoc Amended grammar, punctuation, and word choice. 2022-05-17 10:39:06 -07:00
changelog.asciidoc Merge remote-tracking branch 'krobelus/history-in-mappings' 2022-08-03 20:37:44 +10:00
command-parsing.asciidoc 1) Modified some wording to be more precise 2022-05-10 09:53:03 -07:00
commands.asciidoc doc commands: fix names of complete-command's completion_type arguments 2022-03-08 22:10:28 +01:00
execeval.asciidoc doc execeval: mention that the colon register is saved by default 2022-08-01 07:15:08 +02:00
expansions.asciidoc Fix documentation for %val{window_range} 2022-04-22 21:26:15 +02:00
faces.asciidoc Made changes suggested by krobelus 2022-07-26 13:42:28 -07:00
faq.asciidoc doc faq: Document the frugal scripting language 2020-08-10 12:23:35 +03:00
highlighters.asciidoc highlighter doc: some clarificatory edits 2022-05-23 16:52:30 +05:30
hooks.asciidoc {commands,hooks}.asciidoc: Use consistent capitalization for Kakoune 2021-05-15 22:17:41 -04:00
keymap.asciidoc Fixed some English typos 2019-08-04 00:45:19 +02:00
keys.asciidoc Allow to undo and redo selection changes 2022-09-02 02:59:47 +02:00
mapping.asciidoc Remove unnecessary leading space in prompt from mappings 2022-08-01 07:37:02 +02:00
modes.asciidoc Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
options.asciidoc Grammar correction options.asciidoc 2022-02-13 21:27:31 -05:00
regex.asciidoc doc regex: Avoid confusion in relationship with ECMAScript 2021-10-29 19:21:50 +02:00
registers.asciidoc Merge remote-tracking branch 'krobelus/document-history-registers' 2022-08-03 19:51:22 +10:00
scopes.asciidoc doc: Document the buffer=/path/to/file scope syntax. 2019-01-23 12:34:02 +11:00