From 724238fad60217dd8a960d1555c320d1afca2668 Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Tue, 7 Jun 2016 18:13:31 -0500 Subject: [PATCH] Added better options for moving panes and copy mode --- .tmux.conf | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 1190f0a..6eb58ad 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,3 +1,4 @@ +set -g default-terminal "screen-256color" # Set up default session new @@ -23,9 +24,7 @@ set-option -g display-panes-active-colour red set-option -g display-panes-colour blue set-option -g display-panes-time 1000 set-option -g display-time 750 -set-option -g history-limit 2000 -set-option -g lock-after-time 0 -set-option -g lock-command "lock -np" +set-option -g history-limit 10000 set-option -g word-separators " -_@" set-option -g renumber-windows off set-option -g repeat-time 500 @@ -35,7 +34,6 @@ set-option -g set-titles-string "#S:#I:#W - "#T" #{session_alerts}" set-option -g status on set-option -g status-interval 15 set-option -g status-justify left -set-option -g status-keys emacs set-option -g status-left "[#S] " set-option -g status-left-length 10 set-option -g status-left-style default @@ -79,5 +77,20 @@ bind R source-file ~/.tmux.conf \; display-message "Config reloaded..." # Use C-a,a to send prefix to nested session bind-key a send-prefix +# Use Alt-arrow keys without prefix key to switch panes +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 + +# No delay for escape key press +set -sg escape-time 0 + +# Various copy mode tweaks +bind-key -t vi-copy Home start-of-line +bind-key -t vi-copy End end-of-line +# Sync copy mode and PRIMARY selection +bind-key -t vi-copy MouseDragEnd1Pane copy-pipe "xsel -i -p -b" +bind-key -t vi-copy Enter copy-pipe "xsel -i -p -b" +bind-key -t vi-copy y copy-pipe "xsel -i -p -b" -set -g default-terminal "screen-256color"