[Top][All Lists]

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

RE: lynx-dev line editor

From: Klaus Weide
Subject: RE: lynx-dev line editor
Date: Wed, 21 Jun 2000 16:42:45 -0500 (CDT)

On Wed, 21 Jun 2000, jbeck wrote:

> I meant Line-Editor.
> my aim is to use vi in place of lynx's built-in line editor (when using
> g)go-to url or G)edit url
> I would like to find out if its possible to do this?

Sorry, it is not possible.  There is no provision for using arbitrary
external commands for _line_-editing.  And a vi-like style is not
built in.

You can select between different predefined line edit styles in the
'O'ptions screen, if that is eabled in your copy of lynx.  None of
them is vi-like, though.  The built-in logic has no concept of vi's
different modes.  Or, in other words, you are always in input mode.

In the latest version (2.8.3) you can also modify line-editor bindings
for individual keys; see lynx.cfg under KEYMAP, description of the
OTHER BINDING field.  Maybe you can tweak the line-editor more to
your liking this way.  You should be able to establish *some* bindings
for some frequently used commands in a way that resembles vi.
For a trickier example,
   KEYMAP:Meta-'^'::BOL  #    move to begin of line (or field)
   KEYMAP:Meta-'$'::EOL  #    move to end of line (or field)
may or may not work for you.  The intent is to establish bindings
for ESC ^ and ESC $, respectively.  (Well, I said *resembles* vi...)

The use of "Meta-" in this way (in lynx.cfg) is undocumented...
and it depends on how lynx is compiled.  If compiled with (n)curses
and default configuration options, The Escape key should act as
a meta prefix, as far as lynx is concerned, for _most_, but not
all following (single) keys.  So you can get some vi-resembling
sequences this way.  If compiled with slang and default configuration
options, a bare Escape key doesn't "get through" to lynx, so
another key (by default, control-X - not at all vi-like) has to be
used as a meta prefix.

To get something similar for the Escape key with slang (or also with
ncurses, if you like), you'd have to mess with a file ~/.lynx-keymaps.
There is a sample one with explanations, distributed in

You must be a hardcore vi user to want vi line-editing...  Sinnce I
am not, I don't know whether the above (if it works) would help a

If you like having different modes, you might also like the behavior
of -tna (TEXTFIELDS_NEED_ACTIVATION) for form fields in 2.8.3.


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]