2017-11-08 18:38:31 +01:00
|
|
|
|
= Execute-keys and Evaluate-commands
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
2017-11-02 03:03:24 +01:00
|
|
|
|
== Description
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
2017-11-08 18:38:31 +01:00
|
|
|
|
The *execute-keys* and *evaluate-commands* commands can be used to run
|
2018-03-27 08:21:31 +02:00
|
|
|
|
Kakoune commands:
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
|
|
|
|
----------------------------
|
2018-03-27 08:21:31 +02:00
|
|
|
|
execute-keys [<switches>] <key> ...
|
|
|
|
|
evaluate-commands [<switches>] <command> ...
|
2016-02-03 18:15:35 +01:00
|
|
|
|
----------------------------
|
|
|
|
|
|
2017-11-08 18:38:31 +01:00
|
|
|
|
*execute-keys* runs keys as if they were pressed, whereas *evaluate-commands*
|
|
|
|
|
evaluates its given parameters 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.
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
2018-05-14 23:44:18 +02:00
|
|
|
|
*execute-keys* also save the following registers, who are then restored
|
2016-02-18 13:57:23 +01:00
|
|
|
|
when the commands have been executed: */*, *"*, *|*, *^*, *@*.
|
2018-05-14 23:44:18 +02:00
|
|
|
|
*evaluate-commands* does not save any registers by default.
|
2017-11-08 18:38:31 +01:00
|
|
|
|
(See <<registers#,`:doc registers`>>)
|
2016-02-18 13:57:23 +01:00
|
|
|
|
|
2018-03-27 08:21:31 +02:00
|
|
|
|
== Optional switches
|
2017-11-02 03:03:24 +01:00
|
|
|
|
|
2016-02-03 18:15:35 +01:00
|
|
|
|
*-client* <name>::
|
2017-11-02 10:37:39 +01:00
|
|
|
|
execute in the context of the client named *name*
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
|
|
|
|
*-try-client* <name>::
|
2017-11-02 10:37:39 +01:00
|
|
|
|
execute in the context of the client named *name* if such client
|
|
|
|
|
exists, or else in the current context
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
|
|
|
|
*-draft*::
|
2017-11-02 10:37:39 +01:00
|
|
|
|
execute in a copy of the context of the selected client. Modifications
|
|
|
|
|
to the selections or input state will not affect the client. This
|
|
|
|
|
permits to make some modification to the buffer without modifying
|
|
|
|
|
the user’s selection
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
2017-10-03 14:22:15 +02:00
|
|
|
|
*-itersel*::
|
2017-11-02 10:37:39 +01:00
|
|
|
|
execute once per selection, in a context with only the considered
|
|
|
|
|
selection. This permits avoiding cases where the selections may
|
|
|
|
|
get merged
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
|
|
|
|
*-buffer* <names>::
|
2017-11-02 10:37:39 +01:00
|
|
|
|
execute in the context of each buffers in the comma separated list
|
2019-03-25 16:44:34 +01:00
|
|
|
|
*names*. `*` as a name can be used to iterate on all non-debug buffers
|
|
|
|
|
(See <<buffers#debug-buffers, `:doc buffers`>>)
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
|
|
|
|
*-save-regs* <regs>::
|
2017-11-02 10:37:39 +01:00
|
|
|
|
regs is a string of registers to be restored after execution (overwrites
|
|
|
|
|
the list of registers saved by default, c.f. description)
|
2018-05-15 13:10:18 +02:00
|
|
|
|
|
2018-05-15 13:23:17 +02:00
|
|
|
|
== evaluate-commands specific switches
|
|
|
|
|
|
|
|
|
|
*-no-hooks*::
|
|
|
|
|
disable hook execution while executing the keys/commands
|
2018-08-16 19:06:57 +02:00
|
|
|
|
(See <<hooks#disabling-hooks,`:doc hooks`>>)
|
2018-05-15 13:23:17 +02:00
|
|
|
|
|
2019-10-23 13:23:59 +02:00
|
|
|
|
*-verbatim*::
|
|
|
|
|
do not reparse and split positional arguments. Forward them
|
|
|
|
|
exactly as given to the `evaluate-commands` command.
|
|
|
|
|
|
2018-05-15 13:10:18 +02:00
|
|
|
|
== execute-keys specific switches
|
|
|
|
|
|
|
|
|
|
*-with-maps*::
|
|
|
|
|
use user key mapping in instead of built in keys
|
|
|
|
|
(See <<mapping#,`:doc mapping`>>)
|
2018-05-15 13:23:17 +02:00
|
|
|
|
|
|
|
|
|
*-with-hooks*::
|
|
|
|
|
the execution of keys will trigger existing hooks
|
|
|
|
|
(See <<hooks#,`:doc hooks`>>)
|