Docs: use full names for exec/eval and add links to relevant pages

This commit is contained in:
Delapouite 2017-11-08 18:38:31 +01:00
parent 8168882c3f
commit a1836b47a4
2 changed files with 16 additions and 12 deletions

View File

@ -1,22 +1,23 @@
= Exec and Eval = Execute-keys and Evaluate-commands
== Description == Description
The *exec* and *eval* commands can be used to run Kakoune commands, and The *execute-keys* and *evaluate-commands* commands can be used to run
should be used as follows: Kakoune commands, and should be used as follows:
---------------------------- ----------------------------
exec [<flags>] <key> ... execute-keys [<flags>] <key> ...
eval [<flags>] <command> ... evaluate-commands [<flags>] <command> ...
---------------------------- ----------------------------
*exec* runs keys as if they were pressed, whereas *eval* executes its given *execute-keys* runs keys as if they were pressed, whereas *evaluate-commands*
parameters as if they were entered in the command prompt. By default, their evaluates its given parameters as if they were entered in the command prompt.
execution happens within the context of the current client, and stops when By default, their execution happens within the context of the current client,
the last key/command is reached, or an error is raised. 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 These two commands also save the following registers, who are then restored
when the commands have been executed: */*, *"*, *|*, *^*, *@*. when the commands have been executed: */*, *"*, *|*, *^*, *@*.
(See <<registers#,`:doc registers`>>)
== Optional flags == Optional flags
@ -44,9 +45,11 @@ when the commands have been executed: */*, *"*, *|*, *^*, *@*.
*-no-hooks*:: *-no-hooks*::
disable hook execution while executing the keys/commands disable hook execution while executing the keys/commands
(See <<hooks#,`:doc hooks`>>)
*-with-maps*:: *-with-maps*::
use user key mapping in instead of built in keys (*exec* only) use user key mapping in instead of built in keys (*execute-keys* only)
(See <<mapping#,`:doc mapping`>>)
*-save-regs* <regs>:: *-save-regs* <regs>::
regs is a string of registers to be restored after execution (overwrites regs is a string of registers to be restored after execution (overwrites

View File

@ -180,5 +180,6 @@ A less temporary alternative is to set the `disabled_hooks` option which
accepts a regex describing which hooks won't be executed. accepts a regex describing which hooks won't be executed.
For example indentation hooks can be disabled with '.*-indent'. For example indentation hooks can be disabled with '.*-indent'.
Finally, hook execution can be disabled while using the `exec` or `eval` Finally, hook execution can be disabled while using the `execute-keys` or
commands by using the `-no-hooks` switch. `evaluate-commands` commands by using the `-no-hooks` switch.
(See <<execeval#,`:doc execeval`>>)