From 7f88eff96f60b2b885a922b39f814804fceb161d Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 27 Feb 2018 20:11:17 +0100
Subject: [PATCH] docs: mention that a key can be bound to a string

---
 doc/nano.texi |  9 ++++++++-
 doc/nanorc.5  | 12 +++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/doc/nano.texi b/doc/nano.texi
index cb18a5e6..5ad64fe2 100644
--- a/doc/nano.texi
+++ b/doc/nano.texi
@@ -1041,7 +1041,7 @@ in one of the system-installed files (which normally are not writable).
 @node Rebinding Keys
 @section Rebinding Keys
 
-Key bindings can be changed via the following two commands in a
+Key bindings can be changed via the following three commands in a
 nanorc file:
 
 @table @code
@@ -1050,6 +1050,13 @@ nanorc file:
 Rebinds @code{key} to @code{function} in the context of @code{menu}
 (or in all menus where the function exists by using @code{all}).
 
+@item bind key "string" menu
+Makes @code{key} produce @code{string} in the context of @code{menu}
+(or in all menus where the key exists when @code{all} is used).
+The @code{string} can consist of text or commands or a mix of them.
+(To enter a command into the @code{string}, precede its keystroke
+with @kbd{M-V}.)
+
 @item unbind key menu
 Unbinds @code{key} from @code{menu}
 (or from all menus where it exists by using @code{all}).
diff --git a/doc/nanorc.5 b/doc/nanorc.5
index a30e0eb0..168539c4 100644
--- a/doc/nanorc.5
+++ b/doc/nanorc.5
@@ -395,16 +395,26 @@ slightly improve a syntax defined in one of the system-installed
 files (which normally are not writable).
 
 .SH REBINDING KEYS
-Key bindings can be changed via the following two commands:
+Key bindings can be changed via the following three commands:
+.RS 3
 .TP
 .BI bind " key function menu"
 Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
 context of menu \fImenu\fP (or in all menus where the function exists
 by using \fBall\fP).
+.TP
+.BI bind " key " """" string """" " menu"
+Makes the given \fIkey\fR produce the given \fIstring\fR in the given
+\fImenu\fR (or in all menus where the key exists when \fBall\fR is used).
+The \fIstring\fR can consist of text or commands or a mix of them.
+(To enter a command into the \fIstring\fR, precede its keystroke
+with \fBM-V\fR.)
+
 .TP
 .BI unbind " key menu"
 Unbinds the key \fIkey\fP from the menu named \fImenu\fP (or from all
 menus where it exists by using \fBall\fP).
+.RE
 
 .TP
 The format of \fIkey\fP should be one of:
-- 
GitLab