Skip to content

Instantly share code, notes, and snippets.

@jeffturcotte
Last active December 10, 2015 23:58
Show Gist options
  • Save jeffturcotte/4512880 to your computer and use it in GitHub Desktop.
Save jeffturcotte/4512880 to your computer and use it in GitHub Desktop.
tmux conf
# osx copy/paste
set-option -g default-command "reattach-to-user-namespace -l bash"
# 256 colors
set -g default-terminal "xterm-256color"
# history
set -g history-limit 20000
# set vi keys
set -g status-keys vi
setw -g mode-keys vi
# Set prefix to C-a
set-option -g prefix C-a
unbind C-b
bind C-a send-prefix
# mouse support
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g mouse-select-pane on
#set -g mouse-resize-pane on
set -g mouse-select-window on
set -g mouse-utf8 on
setw -g mode-mouse on
# background activity monitor
setw -g monitor-activity on
set -g visual-activity on
# start window at 1
set -g base-index 1
# faster key repetition
set -sg escape-time 1
# reloading/refreshing
bind r source-file ~/.tmux.conf
#bind-key R refresh-client
# status bar
set-option -g status-utf8 on
set-option -g status-justify left
set-option -g status-bg black
set-option -g status-fg yellow
set-option -g status-right '%a, %b %e %I:%M%p'
set-option -g status-interval 5
set-option pane-border-fg black
set-option pane-active-border-fg white
#set-option -g status-right-length 100
#set-option -g status-left-length 120
#setw -g utf8 on
#setw -g window-status-format ' #I:#W '
#setw -g window-status-bg default
setw -g window-status-current-bg yellow
setw -g window-status-current-fg black
#setw -g window-status-current-attr default
#set-option -g status on
# split windows
bind-key | split-window -h
bind-key - split-window
bind-key _ split-window -p 25
# kill windows/panes/sessions/server
bind-key x kill-pane
bind-key X kill-window
bind-key q confirm-before kill-session
bind-key Q confirm-before kill-server
# window selection
bind-key , previous-window # <
bind-key . next-window # >
# window swapping
bind-key < swap-window -t :-
bind-key > swap-window -t :+
# window tiling
bind = select-layout tiled
# renaming window/session
bind-key n command-prompt 'rename-window %%'
bind-key N command-prompt 'rename-session %%'
# pane resizing w/ arrows
bind -r C-l resize-pane -R 5
bind -r C-h resize-pane -L 5
bind -r C-k resize-pane -U 5
bind -r C-j resize-pane -D 5
# pane selection
bind-key -r " " select-pane -t :.+
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# highlight active window
#set-window-option -g window-status-current-bg red
# OSX copy and paste
unbind -t vi-copy y
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbopy"
bind-key p run-shell "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
# aggressive resize
setw -g aggressive-resize on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment