Skip to content

Instantly share code, notes, and snippets.

@campbell
Last active May 19, 2016 16:38
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 campbell/8b51307425ce0fcf888e75553150aa4e to your computer and use it in GitHub Desktop.
Save campbell/8b51307425ce0fcf888e75553150aa4e to your computer and use it in GitHub Desktop.
# remap prefix to Control + q
set -g prefix C-q
unbind C-b
bind C-a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# http://superuser.com/questions/209437/how-do-i-scroll-in-tmux
set -g mode-mouse on
# enable copy-paste http://goo.gl/DN82E
# enable RubyMotion http://goo.gl/WDlCy
#set -g default-command "reattach-to-user-namespace -l zsh"
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse-select-window on
set -g mouse-select-pane on
set -g mouse-resize-pane on
# Clear the history and buffer
bind -n C-k clear-history
# https://robots.thoughtbot.com/tmux-copy-paste-on-os-x-a-better-future
# 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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment