Tmux

Table of contents:

Options

Always has the correctly-ordered window numbers

set-option -g renumber-windows on

Shortcuts

Kill a window quickly (via alt-k)

bind-key -n M-k confirm-before -p "kill-window #W? (y/n)" kill-window

Zoom/unzoom a pane (via alt-z)

bind-key -n M-z resize-pane -Z

Toggle mouse mode (via alt-m)

bind -n M-m run "\
    tmux show-options -g | grep -q "mouse\\s*on"; \
    if [ \$? = 0 ]; \
    then  \
        toggle=off;  \
    else  \
        toggle=on;  \
    fi;  \
    tmux display-message \"mouse is now: \$toggle\";  \
    tmux set-option -w mouse \$toggle; \
    tmux set-option -g mouse \$toggle; \
    "