public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Gary Johnson <garyjohn@spocom.com>
To: cygwin@cygwin.com
Subject: Re: updated vim broke arrow/delete keys
Date: Fri, 02 Sep 2016 23:12:00 -0000	[thread overview]
Message-ID: <20160902231249.GB24830@phoenix> (raw)
In-Reply-To: <CAMZ6u3uQHxzrmkNjzZz9R-O8isDs-aPx6pBNoWg4CT_jzFnjCA@mail.gmail.com>

On 2016-09-02, Felipe Vieira wrote:
> Dear Gary,
> 
> you are absolutely right. Vim is not the problem.
> 
> I did two changes at the same time and indeed tried the vim -u none
> but maybe did not catch the error.
> 
> Finally what causes the error is:
> 
> inoremap <esc> <Nop>
> 
> no my vimrc. From http://vimdoc.sourceforge.net/htmldoc/map.html:
> 
> *<Nop>*
> A easier way to get a mapping that doesn't produce anything, is to use "<Nop>".
> 
> Anyways this is not the expected behavior. Is there some complexity
> here that I'm not capturing? In theory I'm disabling the <esc> key and
> that's all. Why is it interfering with m arrow keys and the del key?

The escape character alone in insert mode changes the mode to
normal.  The escape character may also begin an "escape sequence"
when it is followed "immediately" by certain other characters.

Vim determines whether an escape character is intended to be
interpreted alone or as the beginning of an escape sequence by
waiting only so long for the next character following the escape.
If the next character arrives after some time limit, the escape is
processed as a single escape and subsequent characters are processed
as themselves rather than part of an escape sequence.

In your case, it appears that the characters following the escape in
the escape sequences for the arrow and delete keys are arriving
after that time limit.  That time limit is set by the 'ttimeoutlen'
option, or by the 'timeoutlen' option if the value of 'ttimeoutlen'
is negative.  See ":help 'ttimeoutlen'".  This timeout defaults to 1
second, which should be plenty of time for a terminal emulator such
as mintty to send an escape sequence.

What do you see when you execute this?

    :verbose set timeoutlen? ttimeoutlen?

Regards,
Gary


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  parent reply	other threads:[~2016-09-02 23:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02 21:43 Felipe Vieira
2016-09-02 22:38 ` Erik Soderquist
2016-09-02 23:12 ` Gary Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-09-04 15:19 Felipe M. Vieira
2016-09-04 20:48 ` Brian Inglis
2016-09-02 15:04 Felipe Vieira
2016-09-02 16:21 ` Gary Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160902231249.GB24830@phoenix \
    --to=garyjohn@spocom.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).