1
1

docs: add two examples of custom key bindings to the nanorc manpage

Этот коммит содержится в:
Benno Schulenberg 2023-02-16 10:44:10 +01:00
родитель 0662fc4d42
Коммит 866490c41f
2 изменённых файлов: 17 добавлений и 6 удалений

Просмотреть файл

@ -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.

Просмотреть файл

@ -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