Skip to content

Instantly share code, notes, and snippets.

@cleac
Created August 26, 2016 06:41
Show Gist options
  • Save cleac/46e70289156a2f453f52eb66c68fa070 to your computer and use it in GitHub Desktop.
Save cleac/46e70289156a2f453f52eb66c68fa070 to your computer and use it in GitHub Desktop.
# Rebind C-b to C-a
unbind C-b
set-option -g prefix `
bind ` send-prefix
bind M-r source-file ~/.tmux.conf
# Fast pane switching
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-j select-pane -U
bind -n M-k select-pane -D
# Mouse enablings
# set -g mouse on
set -g mode-keys vi
# Vim-like selection and copy
bind -n M-` copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-pipe "tmux save-buffer - | xclip -i -sel clipboard"
bind -t vi-copy 'Space' halfpage-down
bind -t vi-copy 'Bspace' halfpage-up
# Copy to buffer
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"
# moving between windows with vim movement keys
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment