kakoune

Fork of kakoune, an acceptable text editor
git clone git://git.laack.co/kakoune.git
Log | Files | Refs

execeval.asciidoc (2440B)


      1 = Execute-keys and Evaluate-commands
      2 
      3 *execute-keys* [<switches>] <key> ...::
      4     Run keys as if they were pressed.
      5 
      6 *evaluate-commands* [<switches>] <command> ...::
      7     Evaluate specified commands as if they were entered into the command
      8     prompt.
      9 
     10 By default, the execution of both commands happens within the context of
     11 the current client, and stops when the last key/command is reached or an
     12 error occurs.
     13 
     14 Without the *-save-regs* switch, *execute-keys* saves the following registers, which
     15 are then restored when the keys have been executed: */*, *"*, *|*, *^*,
     16 *@*, *:*. *evaluate-commands* doesn't save any registers by default.
     17 (See <<registers#,`:doc registers`>>)
     18 
     19 == Switches for both commands
     20 
     21 *-client* <names>::
     22     Execute in the context of each client specified in the comma separated
     23     list *names*. '\*' can be used as *names* to iterate overall clients.
     24 
     25 *-try-client* <name>::
     26     Execute in the context of the client *name* if such client exists,
     27     or else in the current context.
     28 
     29 *-draft*::
     30     Execute in a copy of the context of the selected client. Modifications to
     31     the selections or input state will not affect the client. This permits
     32     making modifications to the buffer without modifying the user’s
     33     selection.
     34 
     35 *-itersel*::
     36     Execute once per selection, each having its own context. This prevents
     37     situations where selections get merged.
     38 
     39 *-buffer* <names>::
     40     Execute in the context of each buffer specified in the comma separated
     41     list *names*. '\*' can be used as *names* to iterate over all non-debug
     42     buffers.
     43     (See <<buffers#debug-buffers, `:doc buffers`>>)
     44 
     45 *-save-regs* <regs>::
     46     *regs* is a string of registers to be restored after execution (overwrites
     47     the list of registers saved by default).
     48 
     49 == Switches specific to *evaluate-commands*
     50 
     51 *-no-hooks*::
     52     Disable hook execution while executing the keys/commands.
     53     (See <<hooks#disabling-hooks,`:doc hooks`>>)
     54 
     55 *-verbatim*::
     56     Don't reparse and split positional arguments. Forward them exactly
     57     as specified.
     58 
     59 == Switches specific to *execute-keys*
     60 
     61 *-with-maps*::
     62     Use a custom key mapping instead of the built-in one.
     63     (See <<mapping#,`:doc mapping`>>)
     64 
     65 *-with-hooks*::
     66     Execute keys and trigger existing hooks.
     67     (See <<hooks#,`:doc hooks`>>)
     68 
     69 == Local scope in *evaluate-commands*
     70 
     71 When using *evaluate-commands* a new scope, named `local` is inserted.
     72 See <<scopes#,`:doc scopes`>>