NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: stupid question on vi



On Sun, 23 Feb 2025, Greg A. Woods wrote:

At Sun, 23 Feb 2025 06:44:02 +0000 (UTC), RVP <rvp%SDF.ORG@localhost> wrote:
Subject: Re: stupid question on vi

nvi(1) has a poorly-documented Ctrl-X key

Looks very well documented to me:

      <control-X>[0-9A-Fa-f]+
             Insert a character with the specified hexadecimal value into the
             text.


Well, how many chars. does that `+' imply? Depends on the version of nvi(1) you
have. The Ubuntu/Debian version permits more than 2, so you can type in Unicode
code-points for emojis. The *BSD versions (nvi and nvi2) don't.

In a UTF-8 locale, are the 2 hex-chars. converted to UTF-8 chars? Yes, on
Net and FreeBSD, but, not on OpenBSD.

The man-page, as you've shown, says "into the text", which implies input into
the document text (set fileencoding=...). But, what about, at the prompt, like
`/' or `:'? Can I create a filename using that <Ctrl-X>NN? And, is this name
subject to the same conversion (set inputencoding=...) as for stuff typed into
the doc.?

One has to experiment to learn all this.

Perhaps you meant "less known"?


That too...

-RVP


Home | Main Index | Thread Index | Old Index