[tmux] Gracefully handle different versions

pull/28/head
Alpha Chen 11 years ago
parent 24cc6c7633
commit c0c8987ed3

@ -43,7 +43,6 @@ bind -t vi-copy 'y' copy-selection
## etc ## etc
set-window-option -g mode-keys vi set-window-option -g mode-keys vi
set-option -sg escape-time 1 # increase vim responsiveness set-option -sg escape-time 1 # increase vim responsiveness
set-option -g renumber-windows on
# set-option -g status-justify centre # set-option -g status-justify centre
set-option -g base-index 1 set-option -g base-index 1
@ -55,8 +54,8 @@ set-option -g prefix C-a
bind a send-prefix bind a send-prefix
bind c new-window -c '#{pane_current_path}' bind c new-window
bind C-c new-window -c '#{pane_current_path}' bind C-c new-window
bind d detach bind d detach
bind C-d detach bind C-d detach
@ -69,8 +68,8 @@ bind C-p previous-window
bind C-a last-window bind C-a last-window
bind v split-window -h -c '#{pane_current_path}' bind v split-window -h
bind s split-window -v -c '#{pane_current_path}' bind s split-window -v
# bind h select-pane -L # bind h select-pane -L
# bind j select-pane -D # bind j select-pane -D
@ -91,6 +90,13 @@ bind -r - resize-pane -D 3
bind -r + resize-pane -U 3 bind -r + resize-pane -U 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 unbind r
bind r source-file ~/.tmux.conf \; display 'Reloaded tmux.conf' bind r source-file ~/.tmux.conf \; display 'Reloaded tmux.conf'

Loading…
Cancel
Save