Skip to content

Instantly share code, notes, and snippets.

@clarenceb
Created December 6, 2013 03:17
Show Gist options
  • Select an option

  • Save clarenceb/7818020 to your computer and use it in GitHub Desktop.

Select an option

Save clarenceb/7818020 to your computer and use it in GitHub Desktop.
Sample Tmux config
#############################
# tmux settings (.tmux.conf)
#############################
#
set -g prefix C-a # Remap PREFIX to be CTRL + a
unbind C-b # Unbind default PREFIX mapping
set -s escape-time 1 # Reduce (or remove with 0) tmux send delay to improve responsiveness when working with vim and other tools.
set -g base-index 1 # Start Window numbering at 1 (instead of 0)
setw -g pane-base-index 1 # Start Pane numbering at 1 (instead of 0)
# Custom key bindings.
# Note: \; can be used to separate multiple commands for a single key binding.
bind a send-prefix # Allow PREFIX (command sequence) to be sent through to nested sessions.
bind r source-file ~/.tmux.conf \; display "Reloaded!" # Reload tmux configuration in the current session.
# Bind h,j,k,l keys to move between panes (up, down, left, right) - like in vim.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize panes (in increments of 5 rows/cols)
# The "-r" means repeatable without PREFIX within default repeat limit (500 ms).
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Cycle through windows by pressing PREFIX CTRL H and PREFIX CTRL L.
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Enable mouse support (works in iTerm)
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
# Make tmux display things in 256 colours.
set -g default-terminal "screen-256color"
# --------------------
# Tmux colour setup
# --------------------
# Status bar foreground and background colours.
set -g status-fg white
set -g status-bg colour17
# Window list in status bar foreground/background colours.
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg colour27
setw -g window-status-current-attr bright
# Panes and active pane border colours.
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
# Command line colours.
set -g message-fg white
set -g message-bg black
set -g message-attr bright
#setw -g aggressive-resize on
#TMUX_COLOUR_BORDER="colour237"
#TMUX_COLOUR_ACTIVE="colour231"
#TMUX_COLOUR_INACTIVE="colour16"
#setw -g window-status-activity-bg $TMUX_COLOUR_BORDER
#setw -g window-status-activity-fg $TMUX_COLOUR_ACTIVE
#setw -g window-status-current-format "#[fg=$TMUX_COLOUR_ACTIVE]#I:#W#F"
#setw -g window-status-format "#[fg=$TMUX_COLOUR_INACTIVE]#I:#W#F"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment