summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJason Felice <jason.m.felice@gmail.com>2018-12-31 12:40:49 -0500
committerJason Felice <jason.m.felice@gmail.com>2020-01-01 19:47:29 -0500
commitb03b51d27ace58cc17eb8a3aec99fa20dd3209ab (patch)
treedc9fa1bcf2d259834f8f31cd4c3c8aac9b816892 /doc
parent62b4780e07e152e037e29823bfd7d911b9767f2e (diff)
Add 'history' and 'uncommitted_modifications' expansions
Diffstat (limited to 'doc')
-rw-r--r--doc/pages/expansions.asciidoc21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/pages/expansions.asciidoc b/doc/pages/expansions.asciidoc
index cda11e73..5156e293 100644
--- a/doc/pages/expansions.asciidoc
+++ b/doc/pages/expansions.asciidoc
@@ -258,6 +258,18 @@ The following expansions are supported (with required context _in italics_):
the text of the error that cancelled execution of the <commands> parameter
(or the previous <on_error_commands> parameter)
+*%val{history}*::
+ _in buffer, window scope_ +
+ the full change history of the buffer, including undo forks, in terms
+ of `parent committed redo_child modification0 modification1 ...`
+ entries, where _parent_ is the index of the entry's predecessor (entry
+ 0, which is the root of the history tree, will always have `-` here),
+ _committed_ is a count in seconds from Kakoune's steady clock's epoch
+ of the creation of the history entry, _redo_child_ is the index of the
+ child which will be visited for `U` (always `-` at the leaves of the
+ history), and each _modification_ is presented as in
+ `%val{uncommited_changes}`.
+
*%val{history_id}*::
_in buffer, window scope_ +
history id of the current buffer, an integer value which refers to a
@@ -353,6 +365,15 @@ The following expansions are supported (with required context _in italics_):
buffer is modified, including undoing and redoing previous modifications
(see also `%val{history_id}`)
+*%val{uncommitted_modifications}*::
+ _in buffer, window scope_ +
+ a list of quoted insertions (in the format `+line.column|text`) and
+ deletions (`-line.column|text`) not yet saved to the history (e.g. typing
+ in insert mode before pressing `<esc>`), where _line_ is the 1-based line
+ of the change, _column_ is the 1-based _byte_ of the change start (see
+ `%val{cursor_column}`), and _text_ is the content of the insertion or
+ deletion (see also `%val{history}`)
+
*%val{user_modes}*::
unquoted list of user modes.