'\" t
.\" Title: kakoune
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 11/16/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH KAK_EXECEVAL 1 "" "" "execeval"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
execeval \- a
.SH "DESCRIPTION"
.sp
The \fBexec\fR and \fBeval\fR commands can be used to run Kakoune commands, and should be used as follows:
.sp
.if n \{\
.RS 4
.\}
.nf
exec [] \&.\&.\&.
eval [] \&.\&.\&.
.fi
.if n \{\
.RE
.\}
.sp
\fBexec\fR runs keys as if they were pressed, whereas \fBeval\fR executes 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\&.
.sp
These two commands also save the following registers, who are then restored when the commands have been executed: \fB/\fR, \fB"\fR, \fB|\fR, \fB^\fR, \fB@\fR\&.
.SH "OPTIONAL FLAGS"
.PP
\fB\-client\fR
.RS 4
execute in the context of the client named
\fBname\fR
.RE
.PP
\fB\-try\-client\fR
.RS 4
execute in the context of the client named
\fBname\fR
if such client exists, or else in the current context
.RE
.PP
\fB\-draft\fR
.RS 4
execute in a copy of the context of the selected client\&. Modifications to the selections or input state will not affect the client\&. This allows making some modification to the buffer without modifying the user\(cqs selection
.RE
.PP
\fB\-itersel\fR (requires \-draft)
.RS 4
execute once per selection, in a context with only the considered selection\&. This allows one to avoid cases where the selections may get merged
.RE
.PP
\fB\-buffer\fR
.RS 4
execute in the context of each buffers in the comma separated list
\fBnames\fR, as a name can be used to iterate on all buffers
.RE
.PP
\fB\-no\-hooks\fR
.RS 4
disable hook execution while executing the keys/commands
.RE
.PP
\fB\-with\-maps\fR
.RS 4
use user key mapping in instead of built in keys (\fBexec\fR
only)
.RE
.PP
\fB\-save\-regs\fR
.RS 4
regs is a string of registers to be restored after execution (overwrites the list of registers saved by default, c\&.f\&. description)
.RE