Skip to content

Instantly share code, notes, and snippets.

Created November 11, 2016 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/0174b1408ec4587bbbde308558312d37 to your computer and use it in GitHub Desktop.
Save anonymous/0174b1408ec4587bbbde308558312d37 to your computer and use it in GitHub Desktop.
# Install reattach-to-user-namespace from
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
set-option -g default-command "reattach-to-user-namespace -l zsh"
# remap prefix
set -g prefix C-a
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 :.+
set -g default-terminal "screen-256color"
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# 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 -l zsh -c 'tmux show-buffer | 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 -l zsh -c 'tmux show-buffer | pbcopy'"
set -g mode-mouse on
set-option -g set-titles on
set-option -g set-titles-string "#{session_name} - #{host}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment