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