tools/vim
Eliminating vim ESC key delay
seul chan
2018. 10. 14. 21:17
After upgrade my mac to high sierra, I figured out that there’s little delay for after ESC key in vim.
I usually use vim for development and blogging, so it’s quite a big problem.
After googling, I found solution for this.
In vim config
~/.vimrc
or your vim config, add this line
set timeoutlen=1000 ttimeoutlen=0
- timeoutlen is used for mapping delays, and ttimeoutlen is used for key code delays.
- You can check docs here
After add timeoutlen
settings, the problem perfectly gone!
In addition to this solution, there’s more for zsh
and tmux
users.
In your zsh setting, add (~/.zshrc
)
# 10ms for key sequences in zsh
KEYTIMEOUT=1
And also in your tmux setting, (~/.tmux.conf
)
set -s escape-time 0
It’s from stackexchange answer Also don’t forget
tmux source-file ~/.tmux.conf
for appling.