brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: set -s escape-time 10 stops the Escape lag in Vim inside tmux

Tmux
~/tips/tip-tmux-escape-time

set -s escape-time 10

Cuts the delay tmux adds after Escape, so Vim and similar editors react at once.

If Escape feels slow in Vim inside tmux, tmux is waiting to see whether more keys follow.

set -s escape-time 10

The default wait is half a second, which is long enough to notice when you press Escape to leave insert mode. Ten milliseconds is short enough to feel instant and long enough for most local terminals.

Over a slow SSH connection a very small value can mix up escape sequences, for example arrow keys that are read as Escape followed by letters. If that happens, raise the number until it stops.

It is a server option, so it needs -s, not -g. Reload the config and it applies to the whole server.

Try it without risk: start a throwaway session with tmux new -s scratch, use the shortcut or command above there, look at what changes, and close it again with tmux kill-session -t scratch.

Further reading: tmux manual page (OpenBSD, official), tmux wiki: Getting Started (official)

More Tmux tips tmux new -d -s report -x 200 -y 50 'top' tmux wait-for build-done set -g allow-passthrough on tmux kill-server Ctrl-b [ All Tmux tips (125) All topics

Link