Erik Zaadi

The tales of a developer with passion for dad jokes

Make remote tmux sane with a keystroke


It’s 2 am. You’re ssh’ing to a server.

Naturally you launch tmux.

‘hacker time’

You run some tail -f on some logs, each in it’s own pane of course.

You try to reproduce something, and then you want to search for it at the logs.


The tmux defaults for copy mode and status keys are not vi.


The horror!

The only thing crappier than that is my memory, because I NEVER remember the syntax for setting it.

Finally, I decided to stop the madness.

My ~/.tmux.conf now has the following:

bind F3 send-keys 'tmux set -g mode-keys vi;tmux set -g status-keys vi' Enter


One keystroke away and any remote tmux I visit in whatever tmux inception scenario, I have my previous vi bindings.

‘Hackerman power up’

Yours truly, Erik, a tmux addict.

Share on: