Skip to content

Instantly share code, notes, and snippets.

@james-gonzalez
Created February 17, 2017 14:02
Show Gist options
  • Save james-gonzalez/a8995cc22b6cecbb934db1f2251f4647 to your computer and use it in GitHub Desktop.
Save james-gonzalez/a8995cc22b6cecbb934db1f2251f4647 to your computer and use it in GitHub Desktop.
# Use C-a as prefix and free C-b
set -g prefix C-a
unbind C-b
# Send C-a to application by pressing it twice
bind C-a send-prefix
# Reload configuration file
unbind r
bind r source-file ~/.tmux.conf \; display "Configration file .tmux reloaded!"
# Redefine splitting shortcuts
bind | split-window -h \; display "Splitting Vertical"
bind - split-window -v \; display "Splitting Horizontal"
# Enable mouse mode and pane selection
set -g mouse 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'
# Titles (window number, program name, active (or not)
set-option -g set-titles on
set-option -g set-titles-string '#H:#S.#I.#P #W #T'
# Pane Selection
bind -n C-left select-pane -L
bind -n C-down select-pane -D
bind -n C-up select-pane -U
bind -n C-right select-pane -R
# Sync tmux panes (replicates input from one pane to the others)
bind p setw synchronize-panes
set-option -g xterm-keys on # this one handles F keys in vim.
# Set terminal for home/end keys to work
set -g default-terminal screen-256color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment