Skip to content

Instantly share code, notes, and snippets.

@benoitjpnet
Last active October 13, 2015 06:57
Show Gist options
  • Save benoitjpnet/4156467 to your computer and use it in GitHub Desktop.
Save benoitjpnet/4156467 to your computer and use it in GitHub Desktop.
Tmux Configuration
# Use vi style when copy-paste mode.
set-window-option -g mode-keys vi
# Use ZSH by default
set-option -g default-shell /bin/zsh
# Map alt keys + direction keys for switching pane.
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Active monitoring
setw -g monitor-activity on
set -g visual-activity on
# Pane switching using mouse
#set-option -g mouse-select-pane on
# History to 100k
set -g history-limit 100000
# Join pane with @
bind-key @ command-prompt -p "create pane from:" "join-pane -s ':%%'"
# Sent pane to another windows
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
# Permit control+arrows
set-window-option -g xterm-keys on
#
#set -g default-terminal "screen-256color"
#source '~/.local/bin/powerline/bindings/tmux/powerline.conf'
#CLIPBOARD selection integration
#Requires prefix key before the command key
#Copy tmux paste buffer to CLIPBOARD
bind C-c run "tmux show-buffer | xclip -i -selection clipboard"
#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
bind C-v run "tmux set-buffer -- \\"$(xclip -o -selection clipboard)\\"; tmux paste-buffer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment