Skip to content

Instantly share code, notes, and snippets.

@spikensbror
Last active August 29, 2015 14:01
Show Gist options
  • Save spikensbror/8776be819d063bcb0967 to your computer and use it in GitHub Desktop.
Save spikensbror/8776be819d063bcb0967 to your computer and use it in GitHub Desktop.
~/.tmux.conf - Tmux configuration.
set -g set-titles off
#set -g set-titles-string "#T"
# Prefix is Ctrl-A.
set -g prefix C-a
bind C-a send-prefix
unbind C-b
#set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
# 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
#setw -g monitor-activity on
#set -g visual-activity on
set -g mode-keys vi
set -g history-limit 10000
# y and p as in vim
bind Escape 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 'Space' halfpage-down
#bind -t vi-copy 'Bspace' halfpage-up
# extra commands for interacting with the ICCCM clipboard
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# easy-to-remember split pane commands
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# moving between panes with vim movement keys
bind j select-pane -L
bind k select-pane -D
bind l select-pane -U
run-shell "tmux bind-key -r 0xC3 display 'c3'; tmux bind-key -r 0xB6 select-pane -R"
# moving between windows with vim movement keys
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# resize panes with vim movement keys
bind -r J resize-pane -L 2
bind -r K resize-pane -D 2
bind -r L resize-pane -U 2
run-shell "tmux bind-key -r 0xC3 display 'c3'; tmux bind-key -r 0x96 resize-pane -R 2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment