Skip to content

Instantly share code, notes, and snippets.

@nwjsmith
Created November 28, 2012 14:59
Show Gist options
  • Save nwjsmith/4161803 to your computer and use it in GitHub Desktop.
Save nwjsmith/4161803 to your computer and use it in GitHub Desktop.
# Act like Vim
setw -g mode-keys vi
# Use the mouse
set -g mode-mouse on
# Look good
set -g default-terminal "screen-256color"
set -g status-right "#[fg=black]#(rbenv version | awk '{ print $1 }' 2> /dev/null)"
set -g status-bg "blue"
set -g window-status-current-bg "black"
set -g window-status-current-fg "blue"
set -g pane-active-border-fg "blue"
set -g status-interval 1000
# Big scrollback buffer
set -g history-limit 15000
# Vim-like pane navigation
bind C-h select-pane -L
bind h select-pane -L
bind C-j select-pane -D
bind j select-pane -D
bind C-k select-pane -U
bind k select-pane -U
bind C-l select-pane -R
bind l select-pane -R
# Vim-like splitting
bind s split-window -v
bind v split-window -h
# Vim-like copy
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# Copy tmux paste buffer to CLIPBOARD
bind C-c run-shell 'tmux save-buffer - | reattach-to-user-namespace pbcopy'
# Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
bind C-v run-shell 'tmux set-buffer "$(reattach-to-user-namespace pbpaste)"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment