Skip to content

Instantly share code, notes, and snippets.

@codyjroberts
Created April 29, 2015 19:30
Show Gist options
  • Save codyjroberts/d0efb316dc990fb444e3 to your computer and use it in GitHub Desktop.
Save codyjroberts/d0efb316dc990fb444e3 to your computer and use it in GitHub Desktop.
# Use backtick as the prefix
# Do it just like this or you will not
# be able to use type backtick literally
unbind C-b
set -g prefix `
bind ` send-prefix
bind-key L last-window
set -g default-terminal "xterm-256color"
# Start numbering at 1
set -g base-index 1
# Automatic renumbering
set -g renumber-windows on
# Make mouse useful in copy mode
setw -g mode-mouse on
# Allow mouse to select which pane to use
set -g mouse-select-pane on
# Scroll History
set -g history-limit 30000
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Basically allows for faster key repetition
set -s escape-time 0
# Set status bar
set -g status-justify left
set-option -g status-interval 5
set -g status-right-length 150
set -g status-bg "#282828"
set -g status-fg "#EBDBB2"
set -g status-left ""
set -g status-right "#[fg=green] %m-%d-%Y %H:%M #(whoami)"
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Allows us to use '<prefix>-a' <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
# Highlight active window
set -g pane-active-border-fg "#282828"
set -g pane-border-fg "#282828"
# Turn on vi bindings in copy mode
set-option -g status-keys vi
set-window-option -g mode-keys vi
# 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 pbcopy"
# Move around panes vim style
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key | split-window -h
bind-key - split-window -v
# keybindings to make resizing easier
bind -r C-h resize-pane -L
bind -r C-j resize-pane -D
bind -r C-k resize-pane -U
bind -r C-l resize-pane -R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment