Document the | register, as well as default registers saved by exec/eval

This commit is contained in:
Frank LENORMAND 2016-02-18 14:57:23 +02:00
parent d317448407
commit c90dafcbfb
3 changed files with 15 additions and 3 deletions

View File

@ -965,6 +965,7 @@ Most commands using a register default to a specific one if not specified:
* `/`: default search register, used by regex based commands like `s`, `*` or `/`
* `@`: default macro register, used by `q` and `Q`
* `^`: default mark register, used by `z` and `Z`
* `|`: default shell command register, used by command that spawn a subshell such as `|`, `<a-|>`, `!` or `<a-!>`
Macros
~~~~~~
@ -995,6 +996,9 @@ the `:exec` and `:eval` commands can be used for running Kakoune commands.
paremeters as if they were entered in the command prompt. By default,
they do their execution in the context of the current client.
These two commands also save the following registers, who are then restored
when the commands have been executed: `/`, `"`, `|`, `^`, `@`.
Some parameters provide a way to change the context of execution:
* `-client <name>`: execute in the context of the client named <name>
@ -1013,7 +1017,7 @@ Some parameters provide a way to change the context of execution:
* `-no-hooks`: disable hook execution while executing the keys/commands
* `-with-maps`: use user key mapping in `:exec` instead of built in keys.
* `-save-regs <regs>`: regs is a string of registers to be restored after
execution.
execution (overwrites the list of registers saved by default)
The execution stops when the last key/command is reached, or an error
is raised.

View File

@ -20,6 +20,9 @@ paremeters as if they were entered in the command prompt. By default, their
execution happens within the context of the current client, and stops when
the last key/command is reached, or an error is raised.
These two commands also save the following registers, who are then restored
when the commands have been executed: */*, *"*, *|*, *^*, *@*.
Optional flags
--------------
*-client* <name>::
@ -51,4 +54,5 @@ Optional flags
use user key mapping in instead of built in keys (*exec* only)
*-save-regs* <regs>::
regs is a string of registers to be restored after execution
regs is a string of registers to be restored after execution (overwrites
the list of registers saved by default, c.f. description)

View File

@ -29,7 +29,7 @@ Most commands using a register default to a specific one if not specified:
and *R*
*/*::
default search register, used by regex based commands like *s*, *\**
default search register, used by regex based commands like *s*, ***
or */*
*@*::
@ -38,6 +38,10 @@ Most commands using a register default to a specific one if not specified:
*^*::
default mark register, used by *z* and *Z*
*|*::
default shell command register, used by command that spawn a subshell such as
*|*, *<a-|>*, *!* or *<a-!>*
Special registers
-----------------
Some registers are not general purposes, they cannot be written to, but they