Yanhao LI
Yanhao LI

Reputation: 25

Why doubly esc mapping not working with neovim + tmux?

I had the following mapping in my .vimrc to clear the search result highlight

nnoremap<esc><esc> :noh<return>

However, I noticed that this mapping does not work when I was using neovim + tmux.

My other mapping works totally fine, the weird thing is, this certain<esc><esc> does work when I was using neovim alone, and its also working with vim8 + tmux.

Anyone knows what might be the problems here?

Upvotes: 1

Views: 570

Answers (1)

Andy
Andy

Reputation: 5414

Add this to your ~/.tmux.conf

set -sg escape-time 0

escape-time time - Set the time in milliseconds for which tmux waits after an escape is input to determine if it is part of a function or meta key sequences. The default is 500 milliseconds.

Upvotes: 3

Related Questions