diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 48d0c79..a7a6075 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -43,7 +43,6 @@ 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 renumber-windows on # set-option -g status-justify centre set-option -g base-index 1 @@ -55,8 +54,8 @@ set-option -g prefix C-a bind a send-prefix -bind c new-window -c '#{pane_current_path}' -bind C-c new-window -c '#{pane_current_path}' +bind c new-window +bind C-c new-window bind d detach bind C-d detach @@ -69,8 +68,8 @@ bind C-p previous-window bind C-a last-window -bind v split-window -h -c '#{pane_current_path}' -bind s split-window -v -c '#{pane_current_path}' +bind v split-window -h +bind s split-window -v # bind h select-pane -L # 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 +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'