Skip to content

Commit

Permalink
add tmux conf
Browse files Browse the repository at this point in the history
  • Loading branch information
gabehollombe committed Aug 25, 2013
1 parent 32f07da commit cbdd83f
Showing 1 changed file with 120 additions and 0 deletions.
120 changes: 120 additions & 0 deletions tmux.conf
@@ -0,0 +1,120 @@
set -g prefix C-a

bind Q kill-pane
bind r command-prompt "rename-window '%%'"
bind s display-panes
bind | split-window -h
bind - split-window -v
bind C-a send-prefix
bind C-c copy-mode
bind C-v choose-buffer
bind C-s choose-session
bind space last-window

bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r left resize-pane -L 10
bind -r down resize-pane -D 10
bind -r up resize-pane -U 10
bind -r right resize-pane -R 10
bind C-h previous-window
bind C-l next-window

set -sg escape-time 1
set -sg repeat-time 200

set -g default-terminal "screen-256color"
set -g base-index 1
set -g status on
set -g status-left-length 40
set -g status-right-length 40
set -g status-left '#[fg=green]#H:#[fg=colour118]#S '
set -g status-right ' %d %b %R '
set -g status-bg black
set -g status-fg white
set -g status-utf8 on
set -g status-justify centre
set -g set-titles on
set -g set-titles-string '#H:#S #W #P'
set -g visual-activity on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on

setw -g mode-mouse on
setw -g mode-keys vi
setw -g utf8 on
# setw -g automatic-rename on
setw -g monitor-activity on

setw -g window-status-fg colour241
setw -g window-status-bg default
setw -g window-status-attr dim

setw -g window-status-current-fg colour196
setw -g window-status-current-bg black
setw -g window-status-current-attr bright

set -g pane-border-fg colour241
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg black

set -g message-fg white
set -g message-bg black
set -g message-attr bright

# ALLOW PUTTY C-Arrow KEYS TO PASSTHROUGH (see tmux FAQ)
set -g terminal-overrides "xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@"

# Support xterm arrow keys
set -g xterm-keys on

# Support for christoomey/vim-tmux-navigator
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"

# Put tmux buffer into mac os x clipboard
# set-option -g default-command "reattach-to-user-namespace -l bash"

# Use vim keybindings in copy mode
setw -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"

# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"


#==============
# CHEAT SHEET
#==============
# Prefix C-a - pass-through
# Prefix C-r - reload tmux.conf
# Prefix C-s - choose session
# Prefix d - detach from session
# Prefix c - create window
# Prefix r - rename window
# Prefix w - list windows
# Prefix n - next window
# Prefix p - previous window
# Prefix space - last window
# Prefix 1-9 - goto window n
# Prefix s - show pane numbers
# Prefix q - quit pane
# Prefix ? - list all bindings
# Prefix : - command-line
# Prefix | - horizontal split
# Prefix - - vertical split
# Prefix C-c - copy mode
# Prefix C-v - paste
# Prefix PgUp - scroll mode

0 comments on commit cbdd83f

Please sign in to comment.