Skip to content

Instantly share code, notes, and snippets.

@rupurt
Created June 22, 2016 14:45
Show Gist options
  • Select an option

  • Save rupurt/41b4b5ca3efb9f6c92b7f5c33c7e93c3 to your computer and use it in GitHub Desktop.

Select an option

Save rupurt/41b4b5ca3efb9f6c92b7f5c33c7e93c3 to your computer and use it in GitHub Desktop.
tmux configuration
# remap prefix to Control + a
set -g prefix C-a
set -g default-terminal "xterm-256color"
set -s escape-time 0
# bind 'C-a C-a' to type 'C-a'
bind C-a send-prefix
unbind C-b
# Lines of history
set-option -g history-limit 10000
# Copy-paste integration
set-option -g default-command "reattach-to-user-namespace -l bash"
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# Bind ']' to use pbpaste
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment