[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim-dev
Subject:    Re: Delay when Insert mode is left
From:       Jens Paulus <jpaulus () freenet ! de>
Date:       2005-01-22 13:42:43
Message-ID: 20050122134243.GA8752 () ee ! ethz ! ch
[Download RAW message or body]

Hi Bram,

On Fri, Jan 14, 2005 at 20:02:07 +0100, Jens Paulus wrote:
> > > what I do not understand is why the ruler cursor position gets updated
> > > after a timeoutlen delay when leaving Insert mode in vim but in gvim it
> > > there is no such delay. The same is also when for example doing
> > > 4iabcd<Esc> and the repeated text is inserted after this delay. In gvim
> > > there are the same settings for timeoutlen, timeout, ttimeout but it
> > > happens immediately. Starting vim with -u NONE or setting it to
> > > nocompatible makes it work immediately and without delay. But with same
> > > settings gvim has no delay but vim has this delay.
> > 
> > The reason is that in a terminal there are key codes that start with
> > Esc.  When Vim receives an Esc in Insert mode it can't be sure if it is
> > the Esc key or the start of a key code (e.g., for a cursor key).  Vim
> > then pretents to go out of Insert mode, but only really does so after
> > 'ttimeoutlen'.
> > 
> > You can fix this by using a terminal that uses CSI for special keys.
> 
> what can be observed is that when starting with -u NONE there is no
> delay. So it is obviously no problem with the terminal in this case.
> When starting with -u empty.filerc and empty.filerc is an empty file
> then there is also no delay and then doing :source .vimrc there is still
> no delay and :scriptnames shows all files which are loaded as usual.
> Please help me to find the cause and fix it.

although I do not know why this helps, my solution is to start with the
option -u .vimrc and then there is no delay anymore and everything works
how it should work. Creating an alias like alias vim vim -u .vimrc is
also helpful.

Best regards

Jens


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic