commit 866490c41f5e123ce4d0239223203db1f44e0ecb
parent 0662fc4d4289b39e795aaf4a0532cbf18b59f771
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 16 Feb 2023 10:44:10 +0100
docs: add two examples of custom key bindings to the nanorc manpage
Diffstat:
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/doc/nano.1 b/doc/nano.1
@@ -392,6 +392,9 @@ Suspension is enabled by default, reachable via \fB^T^Z\fR.
(If you want a plain \fB^Z\fR to suspend nano, add
\fBbind ^Z suspend main\fR to your nanorc.)
.sp
+When you want to copy marked text from \fBnano\fR to the system's clipboard,
+see one of the examples in the \fBnanorc\fR(5) man page.
+.sp
If no alternative spell checker command is specified on the command
line nor in one of the \fInanorc\fP files, \fBnano\fP will check the
\fBSPELL\fP environment variable for one.
diff --git a/doc/nanorc.5 b/doc/nanorc.5
@@ -399,12 +399,6 @@ and disappears after 1.5 seconds or upon the next keystroke.
With \fBM\-Z\fR the title bar plus status bar can be toggled.
With \fBM\-X\fR the help lines.
-.SH NOTES
-Option \fBset suspendable\fR has been removed.
-Suspension is enabled by default, reachable via \fB^T^Z\fR.
-(If you want a plain \fB^Z\fR to suspend nano,
-add \fBbind ^Z suspend main\fR to your nanorc.)
-
.SH SYNTAX HIGHLIGHTING
Coloring the different syntactic elements of a file
is done via regular expressions (see the \fBcolor\fR command below).
@@ -1039,6 +1033,20 @@ For \fBbind\fR it means all menus where the specified \fIfunction\fR exists;
for \fBunbind\fR it means all menus where the specified \fIkey\fR exists.
.RE
+.SH EXAMPLES
+To make \fBCtrl+Z\fR suspend nano:
+.sp
+.RS
+.B bind ^Z suspend main
+.RE
+.sp
+To make \fBShift+Alt+C\fR copy the marked region to the system's clipboard:
+.sp
+.RS
+.B bind Sh-M-C """{execute}| xsel -ib {enter}{undo}""" main
+.RE
+.sp
+
.SH FILES
.TP
.I /etc/nanorc