Skip to content

Instantly share code, notes, and snippets.

@anothergituser
Created October 13, 2014 19:18
Show Gist options
  • Save anothergituser/cbbf678c5ac35a28ad61 to your computer and use it in GitHub Desktop.
Save anothergituser/cbbf678c5ac35a28ad61 to your computer and use it in GitHub Desktop.
tmux config
#Prefix is Ctrl-a
set -g prefix C-a
bind C-a send-prefix
unbind C-b
#Mouse works as expected
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
bind y paste-buffer
bind-key -n A-F1 select-window -t 0
bind-key -n A-F2 select-window -t 1
bind-key -n A-F3 select-window -t 2
bind-key -n A-F4 select-window -t 3
bind-key -n A-F5 select-window -t 4
bind-key -n A-F6 select-window -t 5
bind-key -n M-F7 select-window -t 6
bind-key -n M-F8 select-window -t 7
bind-key -n M-F9 select-window -t 8
bind-key w new-window
unbind %
unbind '"'
bind v split-window -h
bind h split-window -v
setw -g aggressive-resize on
setw -g monitor-activity on
bind -n F13 next-window
bind -n M-tab select-pane -t :.+
bind k confirm kill-window
bind K confirm kill-server
set -g default-terminal "screen-256color"
# Sane scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
setw -g mode-keys vi # vim-style movement
# in normal tmux mode
bind Escape copy-mode # `tmux prefix + Escape` starts copy mode.
bind p paste-buffer # `prefix + p` pastes the latest buffer
# in copy mode…
bind -t vi-copy v begin-selection # `v` begins a selection. (movement keys to select the desired bits)
bind -t vi-copy y copy-selection # `y` copies the current selection to one of tmux's "paste buffers"
bind -t vi-copy V rectangle-toggle # `V` changes between line- and columnwise selection
bind -t vi-copy Y copy-end-of-line # ^1
bind + delete-buffer
bind-key P save-buffer ~/.tmux-buffer \; run-shell "xsel -i -b <~/.tmux-buffer && rm ~/.tmux-buffer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment