diff --git a/.tmux.1-8.conf b/.tmux.1-8.conf new file mode 100644 index 0000000..3269488 --- /dev/null +++ b/.tmux.1-8.conf @@ -0,0 +1,2 @@ +bind s split-window -v # horizontal window split +bind v split-window -h # vertical window split diff --git a/.tmux.1-9.conf b/.tmux.1-9.conf new file mode 100644 index 0000000..a95c348 --- /dev/null +++ b/.tmux.1-9.conf @@ -0,0 +1,3 @@ +unbind c; bind c new-window -c #{pane_current_path}" +bind s split-window -v -c #{pane_current_path}" # horizontal window split +bind v split-window -h -c #{pane_current_path}" # vertical window split diff --git a/.tmux.conf b/.tmux.conf index 366fc91..4e7319c 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -39,13 +39,7 @@ bind-key -t vi-copy 'v' begin-selection bind-key -t vi-copy 'y' copy-selection bind y run-shell "tmux show-buffer | xclip -sel clip -i" -# because the new tmux is inadequate -bind c new-window -c "#{pane_current_path}" - # be more like vim -bind s split-window -v -c "#{pane_current_path}" # horizontal window split -bind v split-window -h -c "#{pane_current_path}" # vertical window split - bind h select-pane -L # left pane bind j select-pane -D # bottom pane bind k select-pane -U # top pane @@ -65,3 +59,6 @@ set-window-option -g window-status-current-bg white set-window-option -g window-status-current-fg black set-option -g status-right '%d %b %Y @ %k:%M' +# because the new tmux is inadequate +if-shell 'test "$(tmux -V) = "tmux 1.8"' "source-file ~/.tmux.1-8.conf" +if-shell 'test "$(tmux -V) = "tmux 1.9"' "source-file ~/.tmux.1-9.conf"