[tmux] Assume 2.x

pull/28/head
Alpha Chen 9 years ago
parent 609afa3bf4
commit 64146dbe4d

@ -10,18 +10,8 @@ set-option -g history-limit 10000
set-option -g status-utf8 on
set-window-option -g utf8 on
## status bar
# set-option -g status-bg black
# set-option -g status-fg white
# set-option -g status-right ""
# set-option -g status-left "#S"
# set-window-option -g window-status-current-attr reverse
# set-window-option -g window-status-current-bg white
# set-window-option -g window-status-current-bg black
## window notifications
set-option -g visual-activity on
set-option -g visual-content on
set-window-option -g monitor-activity off
## title
@ -30,11 +20,7 @@ set-option -g set-titles-string "[#S] #I:#W"
set-option -g automatic-rename on
## mouse
set-window-option -g mode-mouse off
# set-window-option -g mode-mouse on
# set-option -g mouse-select-pane on
# set-option -g mouse-resize-pane on
# set-option -g mouse-select-window on
set-window-option -g mouse off
# copy and paste
bind -t vi-copy 'v' begin-selection
@ -43,15 +29,10 @@ bind -t vi-copy 'y' copy-selection
## etc
set-window-option -g mode-keys vi
set-option -sg escape-time 1 # increase vim responsiveness
# set-option -g status-justify centre
set-option -g base-index 1
## screen bindings
# use C-a as the prefix (a la screen)
# unbind C-b
# set-option -g prefix C-a
bind a send-prefix
bind c new-window
@ -68,13 +49,11 @@ bind C-p previous-window
bind C-a last-window
bind v split-window -h
bind s split-window -v
# bind h select-pane -L
# bind j select-pane -D
# bind k select-pane -U
# bind l select-pane -R
set-option -g renumber-windows on;
bind c new-window -c '#{pane_current_path}';
bind C-c new-window -c '#{pane_current_path}';
bind v split-window -h -c '#{pane_current_path}';
bind s split-window -v -c '#{pane_current_path}';
# Smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
@ -90,13 +69,6 @@ bind -r - resize-pane -D 3
bind -r + resize-pane -U 3
bind -r = resize-pane -U 3
if-shell "[[ `tmux -V` =~ '1.9' ]]" \
"set-option -g renumber-windows on; \
bind c new-window -c '#{pane_current_path}'; \
bind C-c new-window -c '#{pane_current_path}'; \
bind v split-window -h -c '#{pane_current_path}'; \
bind s split-window -v -c '#{pane_current_path}';"
unbind r
bind r source-file ~/.tmux.conf \; display 'Reloaded tmux.conf'

Loading…
Cancel
Save