nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 98e9a881c039fcc4f813a8f1d51ba9c9d2b131c4
parent f420f7c1775b141acda11f6e8216875d499fb862
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Tue, 13 Sep 2022 11:01:03 +0200

docs: mention in the man page how M-V can insert any Unicode code point

This addresses https://savannah.gnu.org/bugs/?63055.

Inspired-by: Tasos Papastylianou <tpapastylianou@hotmail.com>

Diffstat:
Mdoc/nano.1 | 6++++++
Mdoc/nano.texi | 11++++++++---
Mdoc/nanorc.5 | 3++-
3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/doc/nano.1 b/doc/nano.1 @@ -74,6 +74,12 @@ using the arrow keys. Holding down the Ctrl or Alt key too will increase the stride. Any cursor movement without Shift being held will cancel such a selection. .sp +Any valid Unicode code point can be inserted into the buffer by typing +\fBM\-V\fR followed by the hexadecimal digits of the code point (concluded +with \fB<Space>\fR or \fB<Enter>\fR when it are fewer than six digits). +A literal control code (except \fB^J\fR) can be inserted by typing +\fBM\-V\fR followed by the pertinent keystroke. +.sp The two lines at the bottom of the screen show some important commands; the built-in help (\fB^G\fR) lists all the available ones. The default key bindings can be changed via a \fInanorc\fR file -- see diff --git a/doc/nano.texi b/doc/nano.texi @@ -222,14 +222,18 @@ typed the key with that value. @item For any possible character, pressing @kbd{M-V} (Alt+V) and then typing a -six-digit hexadecimal number (starting with @kbd{0} or @kbd{1}) will enter the -corresponding Unicode character into the buffer. +series of hexadecimal digits (at most six, or concluded with @kbd{Enter} or +@kbd{Space}) will enter the corresponding Unicode character into the buffer. @end itemize For example, typing @kbd{Esc Esc 2 3 4} will enter the character "ê" --- useful when writing about a French party. Typing @kbd{M-V 0 0 2 2 c 4} will enter the symbol "⋄", a little diamond. +Typing @kbd{M-V} followed by anything other than a hexadecimal digit +will enter this keystroke verbatim into the buffer, allowing the user +to insert literal control codes (except @code{^J}) or escape sequences. + @node Commands @section Commands @@ -1619,7 +1623,8 @@ Switches to editing/viewing the previous buffer when multiple buffers are open. Switches to editing/viewing the next buffer when multiple buffers are open. @item verbatim -Inserts the next keystroke verbatim into the file. +Inserts the next keystroke verbatim into the file, or begins Unicode input +when a hexadecimal digit is typed (@pxref{Entering Text} for details). @item tab Inserts a tab at the current cursor location. diff --git a/doc/nanorc.5 b/doc/nanorc.5 @@ -828,7 +828,8 @@ Switches to editing/viewing the previous buffer when multiple buffers are open. Switches to editing/viewing the next buffer when multiple buffers are open. .TP .B verbatim -Inserts the next keystroke verbatim into the file. +Inserts the next keystroke verbatim into the file, or begins Unicode input +when a hexadecimal digit is typed. .TP .B tab Inserts a tab at the current cursor location.