Skip to content

Instantly share code, notes, and snippets.

@rszeto
Created September 6, 2021 21:54
Show Gist options
  • Select an option

  • Save rszeto/8a8ddbb16e70c565a9de130f594c9f5c to your computer and use it in GitHub Desktop.

Select an option

Save rszeto/8a8ddbb16e70c565a9de130f594c9f5c to your computer and use it in GitHub Desktop.
tmux configuration
# Remap prefix from C-a to C-Space
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
# Split panes with | and -
unbind '"'
unbind %
bind | split-window -h
bind - split-window -v
# Switch panes with Alt-key w/o prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Switch panes with Alt-key w/o prefix (Vim mappings)
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
# Reload config with r
bind r source-file ~/.tmux.conf \; display 'Reloaded ~/.tmux.config'
# Sync panes with s
bind s setw synchronize-panes \; display 'Sync mode toggled'
# Enable mouse mode by default
# set -g mouse on
# Toggle mouse mode
bind m set -g mouse \; display 'Mouse mode toggled'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment