Skip to content

Instantly share code, notes, and snippets.

@davetapley
Created January 27, 2014 20:17
Show Gist options
  • Select an option

  • Save davetapley/8656382 to your computer and use it in GitHub Desktop.

Select an option

Save davetapley/8656382 to your computer and use it in GitHub Desktop.
My tmux configuration
# use ctrl-a as the prefix (instead of the default ctrl-b)
set-option -g prefix C-a
# pres ctrl-a, ctrl-a to flip between windows
bind-key C-a last-window
# use vi keybinding (basically just hjkl for navigation)
set-window-option -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# move x clipboard into tmux paste buffer
bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
# move tmux copy buffer into x clipboard
bind C-y run "tmux save-buffer - | xclip -i"
# start window and pane numbering at 1 instead of 0
set -g base-index 1
set-window-option -g pane-base-index 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment