Skip to content

Instantly share code, notes, and snippets.

@armiller
Last active August 29, 2015 14:05
Show Gist options
  • Save armiller/3381134c5546c721bf4c to your computer and use it in GitHub Desktop.
Save armiller/3381134c5546c721bf4c to your computer and use it in GitHub Desktop.
Tmux config
# Use vim keybindings in copy mode
setw -g mode-keys vi
set -g status-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"
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g history-limit 10000
set -g set-titles on
set -g set-titles-string "#T"
set -g default-terminal "screen-256color"
# Toggle mouse on with ^B m
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# Toggle mouse off with ^B M
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
set-option -g status-left ' #h |'
set-option -g status-right ' | %Y-%m-%d : %Z %H:%M : UTC #(TZ=UTC date +%%H:%%M) #[default]'
# set -g status-interval 5
setw -g aggressive-resize
set -g status-utf8 on
setw -g monitor-activity on
# shorten command delay
set -sg escape-time 0
# set window and pane index to 1
set-option -g base-index 1
setw -g pane-base-index 1
bind-key v split-window -h
bind-key s split-window -v
# vim pane cycling
bind h select-pane -L \; refresh-client -S
bind j select-pane -D \; refresh-client -S
bind k select-pane -U \; refresh-client -S
bind l select-pane -R \; refresh-client -S
# Use Alt-vim keys
#bind -n M-h select-pane -L
#bind -n M-j select-pane -D
#bind -n M-k select-pane -U
#bind -n M-l select-pane -R
# Use Alt-arrow keys without prefix key to switch panes
#bind -n M-Left resize-pane -L
#bind -n M-Right resize-pane -R
#bind -n M-Up resize-pane -U
#bind -n M-Down resize-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window \; refresh-client -S
bind -n S-Right next-window \; refresh-client -S
# quick pane cycling
#unbind ^B
#bind ^B select-pane -t :.+
bind r source-file ~/.tmux.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment