On Sat, 31 Aug 2013 19:21:28 +0200
Tony Mechelynck <[email protected]> wrote:

> Do you have a proper termcap/terminfo for that terminal? Is $TERM
> (and 'term') set to a correct value? See also
> 
>       :help 'ttybuiltin'
>       :help 'esckeys'
>       :help 'timeout'
>       :help 'ttimeout'
>       :help 'timeoutlen'
>       :help 'ttimeoutlen'

TERM=xterm, as it should be for this terminal. It's an xterm :)

terminfo/termcap are all set right. But neither terminfo nor termcap
knows about these key encodings, as this encoding is newer than 10 years
old :P

  ttybuiltin
  esckeys
  timeout
nottimeout
  timeoutlen=50
  ttimeoutlen=-1

> The workaround, I suppose, would be using Ctrl-P etc. without the
> Shift modifier, which would (hopefully) give the ASCII values for the
> control keys known to ASCII (0x01 for Ctrl-a, 0x02 for Ctrl-b, 0x10
> for Ctrl-p, etc.), but of course, for use as a mapping {lhs}, it
> would collide with many buit-in key bindings (e.g. Ctrl-P is by
> default synonymous with <Up> or k in Normal mode, so there it isn't a
> great loss, but in Insert mode Ctrl-N and Ctrl-P mean next/previous
> completion using 'complete' so you would have to look out if that's a
> use case you're interested in).

It's not so much that I -intend- to press e.g. Ctrl-Shift-P a lot. It's
that sometimes I'll accidentally still have the Shift key held down
when I hit some other Ctrl-letter key combination. Quite often I
-accidentally- hit Ctrl-Shift-N instead of Ctrl-N for omnicomplete.

The trouble here is that vim doesn't just go "beep" to tell me of an
unrecognised key. It sees

  ESC [ 78;5u

causing it to leave insert mode (ESC), start a [ motion that then gets
aborted on seeing the 7, accumulates 8 as the count for the ; motion,
then accumulates 5 as the count for 'u', resulting in it undoing the
previous 5 edits I have just been making in insert mode.

I'd really prefer it not do that :)

Short of -actually- hacking the terminal input byte parser, is there
any way around this?

Failing that, where is the terminal input byte parser (file and line
number) so I can send you a patch to at least have this encoding not
perform this stupid undo action, and instead do something a little more
sensible.

-- 
Paul "LeoNerd" Evans

[email protected]
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

Attachment: signature.asc
Description: PGP signature

Raspunde prin e-mail lui