Skip to content

Instantly share code, notes, and snippets.

@jduff
Created June 17, 2012 20:50
Show Gist options
  • Save jduff/2945707 to your computer and use it in GitHub Desktop.
Save jduff/2945707 to your computer and use it in GitHub Desktop.
# pretty colors
set -g default-terminal "screen-256color"
# default tmux key
unbind-key C-b
set -g prefix C-a
set -g base-index 1
set -g history-limit 100000
# splitting windows
unbind %
bind | split-window -h
bind - split-window -v
# colors of the status bar
set -g status-bg white
set -g status-fg black
set-window-option -g window-status-current-bg red
# Use the mouse for things, if we want
set -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# Reload tmux conf.
unbind r
bind r source-file ~/.tmux.conf\; display "Reloaded conf."
# Clear screen (only works with a shell prompt).
bind k send-keys "clear"\; send-keys "Enter"
# Copy and paste
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
# brew install reattach-to-user-namespace
set -g default-command "reattach-to-user-namespace -l bash"
# All of this might not be needed, but this lets me make a selction in VIM,
# y to yank it and it ends up in the OS X copy buffer.
# Buffer can then be pasted anywhere using the normal means.
setw -g mode-keys vi
bind Escape copy-mode
unbind [
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy Escape cancel
bind-key C-c run-shell "tmux save-buffer - | reattach-to-user-namespace pbcopy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment