New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape Key not working as expected with Neovim and Tmux 2.1 #3593

Closed
gavsim opened this Issue Nov 3, 2015 · 6 comments

Comments

Projects
None yet
5 participants
@gavsim

gavsim commented Nov 3, 2015

Hi,

I am trying to migrate across to using Neovim full time but have come across a bug which is preventing me.

I am running Tmux 2.1 and when I launch a new session and run Neovim, whenever I am in insert mode I have to press escape twice to actually exit insert mode. If I only press escape once and then press the letter 'i' I get an 'é' output in insert mode. This does not happen if I am running Neovim not in a Tmux session, but If I run vim both with and without a tmux session I have no problem escaping insert mode etc..

My setup is Neovim 0.1
Tmux 2.1
iTerm 2 nightly

Any help or pointers where I am going wrong would be greatly appreciated.

Thanks

@wlhlm

This comment has been minimized.

Show comment
Hide comment
@wlhlm

wlhlm Nov 3, 2015

It may help to reduce tmux escape-time. Ref tmux/tmux#131

wlhlm commented Nov 3, 2015

It may help to reduce tmux escape-time. Ref tmux/tmux#131

@gavsim

This comment has been minimized.

Show comment
Hide comment
@gavsim

gavsim Nov 3, 2015

@wlhlm Thank you, I've reduced it down to 0 and working great!

gavsim commented Nov 3, 2015

@wlhlm Thank you, I've reduced it down to 0 and working great!

@gavsim gavsim closed this Nov 3, 2015

@daniely

This comment has been minimized.

Show comment
Hide comment
@daniely

daniely Mar 19, 2016

I had the same issue. set escape-time 0 fixed it for me.

daniely commented Mar 19, 2016

I had the same issue. set escape-time 0 fixed it for me.

zackhsi added a commit to zackhsi/dotfiles that referenced this issue Apr 4, 2016

@justinmk justinmk added usage tui labels May 1, 2017

@butla

This comment has been minimized.

Show comment
Hide comment
@butla

butla Sep 13, 2017

Any idea why this isn't a problem with standard vim? If this is a tmux issue, then tmux should capture the escape for normal Vim as well. Or does normal Vim somehow deciphers the escape sequence sent to it by Tmux (e.g. when you switch out of insert mode, and immediately issue 'gg') and the thing you expected?

Handling keys in terminal never ceases to amaze me.

butla commented Sep 13, 2017

Any idea why this isn't a problem with standard vim? If this is a tmux issue, then tmux should capture the escape for normal Vim as well. Or does normal Vim somehow deciphers the escape sequence sent to it by Tmux (e.g. when you switch out of insert mode, and immediately issue 'gg') and the thing you expected?

Handling keys in terminal never ceases to amaze me.

@justinmk

This comment has been minimized.

Show comment
Hide comment
@justinmk

justinmk Sep 13, 2017

Member

It is a problem in Vim. The way the problem manifests is different because Vim doesn't handle meta chords by default.

https://github.com/neovim/neovim/wiki/FAQ#why-doesnt-this-happen-in-vim

Member

justinmk commented Sep 13, 2017

It is a problem in Vim. The way the problem manifests is different because Vim doesn't handle meta chords by default.

https://github.com/neovim/neovim/wiki/FAQ#why-doesnt-this-happen-in-vim

@butla

This comment has been minimized.

Show comment
Hide comment
@butla

butla Sep 13, 2017

@justinmk Thanks for the explanation. I feel that now this issue thread is complete and will serve posteriority well :)

butla commented Sep 13, 2017

@justinmk Thanks for the explanation. I feel that now this issue thread is complete and will serve posteriority well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment