Skip to content

Instantly share code, notes, and snippets.

@webframp
Last active October 13, 2015 07:58
Show Gist options
  • Save webframp/4164214 to your computer and use it in GitHub Desktop.
Save webframp/4164214 to your computer and use it in GitHub Desktop.
OS X tmux config
# basic settings
set -g default-terminal "screen-256color"
setw -g xterm-keys on
set -g base-index 1
set -s escape-time 0
setw -g mode-mouse off
# brew install reattach-to-user-namespace
set -g default-command "reattach-to-user-namespace -l zsh"
# bindings
# first rebind prefix
unbind C-b
set -g prefix C-z
bind C-z send-prefix
# easily reload config
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# vim like window nav
bind j select-pane -D
bind k select-pane -U
# and resize
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
# copy/paste
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
#bind C-g run-shell 'tmux save-buffer - | reattach-to-user-namespace gist'
#bind C-p run-shell 'tmux save-buffer - | reattach-to-user-namespace gist -p'
# memorable splits
bind | split-window -h
bind - split-window -v
# Powerline - optional
#source ~/src/powerline/powerline/bindings/tmux/powerline.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment