Skip to content

Instantly share code, notes, and snippets.

@androiddrew
Created November 1, 2019 18:50
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 androiddrew/7ea5135546264c7a109819e093ca8d2d to your computer and use it in GitHub Desktop.
Save androiddrew/7ea5135546264c7a109819e093ca8d2d to your computer and use it in GitHub Desktop.
A reasonable tmux.conf
# Allow copy paste with "y"
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# Use Alt-arrow keys without prefix key 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
# List of plugins
# https://github.com/tmux-plugins/tpm
# https://github.com/tmux-plugins/tmux-yank
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# adding plugin for tmux-resurrect
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g default-terminal "screen-256color"
setw -g mode-keys vi
set -g set-clipboard on
set -g @plugin 'tmux-plugins/tmux-yank'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment