Skip to content

Instantly share code, notes, and snippets.

@jmxpearson
Created March 19, 2017 12:19
Show Gist options
  • Save jmxpearson/c34ba0f48c7f15f3e8c63ae1cdfe90a3 to your computer and use it in GitHub Desktop.
Save jmxpearson/c34ba0f48c7f15f3e8c63ae1cdfe90a3 to your computer and use it in GitHub Desktop.
tmux configuration
# set prefix to backtick
set -g prefix `
unbind C-b
bind ` send-prefix
# set delay between prefix and command (copied from tmux book)
set -s escape-time 1
# set r to reload
bind r source-file ~/.tmux.conf \; display 'Reloaded!'
# sensible splitting
bind | split-window -h
bind - split-window -v
# moving between panes
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# moving between windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# resizing windows
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# colors
set -g default-terminal "screen-256color"
# copy mode
setw -g mode-keys vi
bind Escape copy-mode
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
unbind p
bind p paste-buffer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment