2017-11-08 18:38:31 +01:00
|
|
|
|
= Execute-keys and Evaluate-commands
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
2022-07-14 04:41:42 +02:00
|
|
|
|
*execute-keys* [<switches>] <key> ...::
|
|
|
|
|
Run keys as if they were pressed.
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
2022-07-14 04:41:42 +02:00
|
|
|
|
*evaluate-commands* [<switches>] <command> ...::
|
|
|
|
|
Evaluate specified commands as if they were entered into the command
|
|
|
|
|
prompt.
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
2022-07-14 04:41:42 +02:00
|
|
|
|
By default, the execution of both commands happens within the context of
|
|
|
|
|
the current client, and stops when the last key/command is reached or an
|
|
|
|
|
error occurs.
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
2022-07-14 08:22:55 +02:00
|
|
|
|
Without the *-save-regs* switch, *execute-keys* saves the following registers, which
|
2022-07-14 04:41:42 +02:00
|
|
|
|
are then restored when the keys have been executed: */*, *"*, *|*, *^*,
|
2022-07-31 10:44:53 +02:00
|
|
|
|
*@*, *:*. *evaluate-commands* doesn't 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
|
|
|
|
|
2022-07-14 04:41:42 +02:00
|
|
|
|
== Switches for both commands
|
2017-11-02 03:03:24 +01:00
|
|
|
|
|
2016-02-03 18:15:35 +01:00
|
|
|
|
*-client* <name>::
|
2022-07-14 04:41:42 +02:00
|
|
|
|
Execute in the context of the client *name*.
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
|
|
|
|
*-try-client* <name>::
|
2022-07-14 04:41:42 +02:00
|
|
|
|
Execute in the context of the client *name* if such client exists,
|
|
|
|
|
or else in the current context.
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
|
|
|
|
*-draft*::
|
2022-07-14 04:41:42 +02: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
|
|
|
|
|
making modifications 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*::
|
2022-07-14 04:41:42 +02:00
|
|
|
|
Execute once per selection, each having its own context. This prevents
|
|
|
|
|
situations where selections get merged.
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
|
|
|
|
*-buffer* <names>::
|
2022-07-14 04:41:42 +02:00
|
|
|
|
Execute in the context of each buffer specified in the comma separated
|
|
|
|
|
list *names*. `*` can be used as a *name* to iterate over all non-debug
|
|
|
|
|
buffers.
|
2019-03-25 16:44:34 +01:00
|
|
|
|
(See <<buffers#debug-buffers, `:doc buffers`>>)
|
2016-02-03 18:15:35 +01:00
|
|
|
|
|
|
|
|
|
*-save-regs* <regs>::
|
2022-07-14 04:41:42 +02:00
|
|
|
|
*regs* is a string of registers to be restored after execution (overwrites
|
|
|
|
|
the list of registers saved by default).
|
2018-05-15 13:10:18 +02:00
|
|
|
|
|
2022-07-14 04:41:42 +02:00
|
|
|
|
== Switches specific to *evaluate-commands*
|
2018-05-15 13:23:17 +02:00
|
|
|
|
|
|
|
|
|
*-no-hooks*::
|
2022-07-14 04:41:42 +02:00
|
|
|
|
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*::
|
2022-07-14 04:41:42 +02:00
|
|
|
|
Don't reparse and split positional arguments. Forward them exactly
|
|
|
|
|
as specified.
|
2019-10-23 13:23:59 +02:00
|
|
|
|
|
2022-07-14 04:41:42 +02:00
|
|
|
|
== Switches specific to *execute-keys*
|
2018-05-15 13:10:18 +02:00
|
|
|
|
|
|
|
|
|
*-with-maps*::
|
2022-07-14 04:41:42 +02:00
|
|
|
|
Use a custom key mapping instead of the built-in one.
|
2018-05-15 13:10:18 +02:00
|
|
|
|
(See <<mapping#,`:doc mapping`>>)
|
2018-05-15 13:23:17 +02:00
|
|
|
|
|
|
|
|
|
*-with-hooks*::
|
2022-07-14 04:41:42 +02:00
|
|
|
|
Execute keys and trigger existing hooks.
|
2018-05-15 13:23:17 +02:00
|
|
|
|
(See <<hooks#,`:doc hooks`>>)
|
2024-04-11 03:37:18 +02:00
|
|
|
|
|
|
|
|
|
== Local scope in *evaluate-commands*
|
|
|
|
|
|
|
|
|
|
When using *evaluate-commands* a new scope, named `local` is inserted.
|
|
|
|
|
See <<scopes#,`:doc scopes`>>
|