Skip to content

Instantly share code, notes, and snippets.

@zsnmwy
Created October 5, 2021 05:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zsnmwy/29833033857266fae854ba3240fda5be to your computer and use it in GitHub Desktop.
Save zsnmwy/29833033857266fae854ba3240fda5be to your computer and use it in GitHub Desktop.
setw -g mode-keys vi
# Send prefix
set-option -g prefix C-e
unbind-key C-e
bind-key C-e send-prefix
# Use Alt-arrow keys to switch panes
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
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Mouse mode
set -g mouse on
# Set easier window split keys
bind-key v split-window -h
bind-key h split-window -v
# Easy config reload
bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded"
# Use v to trigger selection
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Use y to yank current selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment