bug-bash
[Top][All Lists]
Advanced

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

Re: readline: edit (mode:vi) means eol unreachable


From: Hugh Sasse
Subject: Re: readline: edit (mode:vi) means eol unreachable
Date: Thu, 8 Feb 2007 10:04:52 +0000 (WET)

On Wed, 7 Feb 2007, Chet Ramey wrote:

> Hugh Sasse wrote:
> 
> >> I'm not sure I understand the question.  If the termcap/terminfo entries
> > 
> > The question is about the vi edit mode for a correctly configured
> > terminal, with no personalization.  Should the cursor keys take me
> > out of insert mode, or leave me in insert mode (like vim), and
> > should I be able to move to beyond the last character (after having
> > moved left) so that I can append more text?
> 
> It depends on whether or not the termcap/terminfo capabilities are
> specified.  Readline binds some common arrow key sequences by default

Well, I'm considering the case of a terminal with cursor keys.
I'm trying to understand how I can test for a correctly configured
terminal, so I can eliminate misconfiguration from my problem.

> (xterm and vt100), but if your arrow keys output something else,

I think so, left, right, up, down give
brains hgs 19 %> cat -v
^[[D^[[C^[[A^[[B
^[[D^[[C^[[A^[[B
brains hgs 20 %>

> either they need to be in termcap/terminfo or you need to bind them
> yourself in .inputrc.  If the key sequence isn't bound, it will be

Either strategy is equally valid?  Well, I'm trying to get terminfo
right.  Then what is the correct behaviour when all is working?  
Should I be able to move left with the arrow keys and then move
far enough right to append, or should I have to hit <ESC><A>
to append?

> treated as a series of keys probably beginning with ESC, which:
> 
> > All this could be complicated by the cursor keys emitting Escape, 
> > which could interact horribly with vi mode!
> 
> Readline can work around this.

OK.
> 
> Chet
        Thank you,
        Hugh




reply via email to

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