msknathan / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

Tip for: "Avoiding escape timeout issues in vim" Causing Problems #286

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have my .vimrc set up to change the cursor shape when entering and leaving 
insert mode by having the following in .vimrc which I got from the Tips page:
let &t_ti.="\e[?7727h"
let &t_te.="\e[?7727l"
noremap <Esc>O[ <Esc>
noremap! <Esc>O[ <Esc>

Now that version 1.0.1 is out there is no longer a delay when entering insert 
mode. However there is still a delay when exiting insert mode. Therefore I 
tried using the next Tip for "Avoiding escape timeout issues in vim" by adding 
the following to my .vimrc:
let &t_ti.="\e[?7727h"
let &t_te.="\e[?7727l"
noremap <Esc>O[ <Esc>
noremap! <Esc>O[ <Esc>

This does successfully get rid of the delay, however sometimes the keys "0[" 
are entered after Vim goes into normal mode causing a new line to be created 
above the current line and the text "[" to appear on that line. The strange 
thing is that it does not always happen and I can't seem to find a consistent 
way to reproduce it. Something that often reproduces it for me is going into 
insert mode, escaping, moving with J or K and then going into and out of insert 
mode again.

Here is my setup:
mintty 1.0.1
Cygwin 1.7.9(0.237/5/3) - newest version, I just updated today
Windows 7 Pro 64

Original issue reported on code.google.com by JesseDic...@gmail.com on 5 Aug 2011 at 6:10

GoogleCodeExporter commented 9 years ago
Sounds like an issue with vim's escape timeout. If you've customised it, it 
might be worth trying to remove that customisation. If not, you might want to 
switch it off completely. See here:

http://vimdoc.sourceforge.net/htmldoc/options.html#%27timeout%27

(This is more of a vim issue really, and I don't really understand vim key 
processing.)

Original comment by andy.koppe on 5 Aug 2011 at 8:30

GoogleCodeExporter commented 9 years ago
I think I understand the issue a little better now. What does this part do?
let &t_ti.="\e[?7727h"
let &t_te.="\e[?7727l"

Original comment by JesseDic...@gmail.com on 11 Aug 2011 at 5:36