Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In other words, how do get back a default behavior?

I used this config (from the book tmux - Productive Mouse-Free Development):

# Maximize and restore a pane
unbind Up
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp

As the comment says, you bind the PREFIX+Up key to a 'maximize' action and the PREFIX+Down key to a 'restore' action. This is really cool and I like it, but after trying it out for a while I'd like to go back to using Up and Down to move around panes.

Simply removing the lines from the .tmux.conf file and reloading did not get PREFIX+Up and PREFIX+Down back to their default behavior. How can I get PREFIX+Up and PREFIX+Down to move between panes again?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

There is no way direct way to restore a binding to its default other than just doing it explicitly.

These are the default bindings:

bind-key -r      Up select-pane -U
bind-key -r    Down select-pane -D

Paste them into some file (e.g. /tmp/default-up-down) and source it into your server. You can automate it a bit by extracting the bindings from a fresh, evanescent server:

# extract some default bindings from a fresh server
tmux -f /dev/null -L temp start-server\; list-keys | grep -E ' (Up|Down)' >/tmp/default-up-down

# make sure you got the bindings you wanted
cat /tmp/default-up-down

# apply the bindings to your normal server
tmux source /tmp/default-up-down

Note: The output of list-keys is generally directly usable, but you may have to massage it a bit if you have bindings that involve complicated quoting or you are binding special keys like ; (which usually acts as a tmux command separator, so it needs to be escaped with a backslash). Though, the default bindings of Up and Down should not pose any such problems.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.