Tmux

<< Back to wiki homepage

Table of contents:

Options

Always has the correctly-ordered window numbers

set-option -g renumber-windows on

Sync panes (send your inputs to all panes at the same time)

setw synchronize-panes 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 mouse | grep -q on ; \
    if [ \$? = 0 ]; then  \
        toggle=off;  \
    else  \
        toggle=on;  \
    fi;  \
    tmux display-message \"mouse is now: \$toggle\";  \
    tmux set-option -wg mouse ; \
    "