Skip to content

Instantly share code, notes, and snippets.

@agoose77
Created October 28, 2019 22:15
Show Gist options
  • Save agoose77/3e3b273cbfdb8a870c97ebb346beef8e to your computer and use it in GitHub Desktop.
Save agoose77/3e3b273cbfdb8a870c97ebb346beef8e to your computer and use it in GitHub Desktop.
# Use F1 as modifier
unbind C-b
set -g prefix F1
bind F1 send-prefix
# split panes using h and b
bind h split-window -h
bind v split-window -v
unbind '"'
unbind %
# switch panes using Alt-arrow without 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
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# Quick config editing
bind C split-window -h "micro ~/.tmux.conf"
# https://unix.stackexchange.com/questions/348913/copy-selection-to-a-clipboard-in-tmux
# For vi copy mode bindings
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i"
# For emacs copy mode bindings
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i"
set-option -s set-clipboard off
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment