bosshack / polka

An *nix based development configuration
http://github.com/thefishbowl/polka
MIT License
14 stars 15 forks source link

Exit insert mode instantly #11

Closed tonylegrone closed 11 years ago

tonylegrone commented 11 years ago

Removes delay when existing insert mode.

leesmith commented 11 years ago

I've also seen ":set noesckeys" to kill that delay as well. Which is better?

Maybe a third method: https://code.google.com/p/mintty/wiki/Tips#Avoiding_escape_timeout_issues_in_vim

Also, it seems like neither of these methods work while you're in tmux.

tmiller commented 11 years ago

setting :set noesckeys will supposedly break things. I'm pretty sure this PR has the correct strategy. I haven't pulled it yet because I need to see how to fix tmux as well, and I may have left it out because fixing it in both vim and tmux makes it ugly.

tmiller commented 11 years ago

I believe the wait was caused by tmux not vim. This should have been fixed by evantravers@66b6b2410de4127d82b943de8d6ea40dfd126d8f. @tonylegrone let me know if you still have the issue.

tonylegrone commented 11 years ago

@tmiller I pulled the latest code, but I still experience the delay without :set timeout=0.

tmiller commented 11 years ago

I've decided not to pull this in. The delay is only a visual delay and does not prevent you from executing another command immediately after leaving insert mode. If you wish to remove the visual delay please add set timeoutlen=0 in .vimrc.local.