how do you insert ^[ in vi?

Jay R. Ashworth jra at baylink.com
Fri May 28 09:36:51 PDT 2004


On Fri, May 28, 2004 at 12:37:28PM -0400, Fairlight wrote:
> > > But GNU's stty(1) man page does:
> > > 
> > >        * lnext CHAR    CHAR will enter the next character quoted
> > > 
> > > The asterisk means it's a non-POSIX setting.
> > > 
> > > Couldn't let it rest 'till I found it.  I feel better now.  :)
> > 
> > It's also only in "cooked" mode.  Since most (all?) full-screen programs
> > (including vi and filePro) run in raw mode, it has no effect on them.
> 
> Please clarify.  Does this mean that while at the shell level (or in other
> cooked-mode programs) it works via stty, but vi and the like internally
> emulate the behaviour and they key configuration would be unalterable via
> stty?  I've never had occasion to change it.

The actual implication is that lnext tells the terminal driver, in
non-raw mode, not to interpret a character (like an INTR) that it
would otherwise interpret itself, and to pass it to the app instead.

In raw mode (and for some characters, in cbreak mode) the lnext char
is itself passed to the app, as is the character it would have been
quoting -- since in these modes, *no* characters are interpreted by
the terminal driver.

Efectively, lnext means "go into raw mode for one character".

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Member of the Technical Staff     Baylink                             RFC 2100
The Suncoast Freenet         The Things I Think
Tampa Bay, Florida        http://baylink.pitas.com             +1 727 647 1274

        "They had engineers in my day, too."  -- Perry Vance Nelson


More information about the Filepro-list mailing list