Skip to content

Instantly share code, notes, and snippets.

@soarez soarez/.tmux.conf

Last active Dec 20, 2015
What would you like to do?
My messy tmux conf
# use b as prefix
set-option -g prefix C-b
unbind-key C-a
bind-key C-b send-prefix
# Start numbering at 1
set-option -g base-index 1
# Allows for faster key repetition
set-option -g escape-time 0
# status bar
set-option -g status-utf8 on
# default statusbar colors
set-option -g status-bg black #base02
set-option -g status-fg yellow
# set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg blue #base0
set-window-option -g window-status-bg default
# active window title colors
set-window-option -g window-status-current-fg brightblue #orange
set-window-option -g window-status-current-bg default
# pane border
set-option -g pane-border-fg colour240 #base02
set-option -g pane-active-border-fg brightblue #base01
# status right
set-option -g status-right '#H %a %d-%b %H:%M'
# 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.
set-window-option -g aggressive-resize on
# Activity monitoring
set-window-option -g monitor-activity on
set-option -g visual-activity on
# Mouse
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-window-option -g mode-mouse on
# Reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# auto window rename
set-window-option -g automatic-rename on
# in osx use reattach-to-user-namespace if that command is available
set-option -g default-command "if [ \"$(uname)\" = \"Darwin\" ]; then reattach-to-user-namespace -l $SHELL; else $SHELL -l; fi"
# Vi copypaste mode
set-window-option -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-nd-selection
bind-key -t vi-copy y copy-pipe "if [ \"$(uname)\" = \"Darwin\" ]; then reattach-to-user-namespace pbcopy; else xclip -selection clipboard; fi"
# hjkl pane traversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# color
set -g default-terminal "screen-256color"
# tmux 1.9 decided it was a good idea to ditch default-path. idiots,
# now every command to create a new pane/window must be rebound
bind-key c new-window -c "#{pane_current_path}"
bind-key % split-window -h -c "#{pane_current_path}"
bind-key '"' split-window -v -c "#{pane_current_path}"
# emacs key bindings in tmux command prompt (prefix + :) are better than
# # vi keys, even for vim users
set -g status-keys emacs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.