Skip to content

Instantly share code, notes, and snippets.

@frnsys
Created March 17, 2014 02:03
Show Gist options
  • Save frnsys/9592712 to your computer and use it in GitHub Desktop.
Save frnsys/9592712 to your computer and use it in GitHub Desktop.
tmux.conf
# Required for vim's copy and paste to work in tmux.
# Install this first:
# brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace
set-option -g default-command "reattach-to-user-namespace -l bash"
# Set Ctrl-a as prefix
# (instead of Ctrl-b)
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Change bindings
unbind /
bind / last-window
unbind %
bind s split-window -v
unbind '"'
bind v split-window -h
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
unbind {
bind { swap-pane -D
unbind }
bind } swap-pane -U
unbind [
bind [ previous-window
unbind ]
bind ] next-window
bind Escape copy-mode
bind p paste-buffer
# No delay after prefix
set -s escape-time 0
# Status bar colors
set-option -g status-bg colour234
set-option -g status-fg colour242
set-option -g status-attr default
# Default window title colors
set-window-option -g window-status-fg colour242
set-window-option -g window-status-bg default
# Active window title colors
set-window-option -g window-status-current-fg colour122
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright
set-window-option -g utf8 on
bind C-s choose-session
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
bind C-c run "tmux save-buffer - | pbcopy"
bind C-v run "tmux set-buffer \"$(pbpaste)\"; tmux paste-buffer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment