Skip to content

Instantly share code, notes, and snippets.

@dustincys
Created June 8, 2015 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustincys/5593b68fed0cb23a9766 to your computer and use it in GitHub Desktop.
Save dustincys/5593b68fed0cb23a9766 to your computer and use it in GitHub Desktop.
###########################################################################
# General options
# Default termtype. If the rcfile sets $TERM, that overrides this value.
#set -g default-terminal screen-256color
# Ring the bell if any background window rang a bell
set -g bell-action any
# Watch for activity in background windows
setw -g monitor-activity on
# scrollback size
set -g history-limit 10000
# set first window to index 1 (not 0) to map more to the keyboard layout
set -g base-index 1
setw -g pane-base-index 1
# reload tmux config
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config.'
# Use vi keybindings for tmux commandline input.
# Note that to get command mode you need to hit ESC twice...
# Use vi keybindings in copy and choice modes
setw -g mode-keys vi
###########################################################################
# Pane management / navigation
# Remap window navigation to vim
unbind-key j
bind-key j select-pane -D
unbind-key k
bind-key k select-pane -U
unbind-key h
bind-key h select-pane -L
unbind-key l
bind-key l select-pane -R
# easily toggle synchronization (mnemonic: e is for echo)
# sends input to all panes in a given window.
bind e setw synchronize-panes on
bind E setw synchronize-panes off
###########################################################################
# Scrollback / pastebuffer
# Vim-style copy/paste
unbind [
bind y copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy Escape cancel
###########################################################################
# Mouse mode
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
# Toggle mouse on
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
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 status-bg default
set status-fg colour14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment