From 1d2f1c237d7390945188b16c8e57d7c8aa7e4372 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 27 Apr 2012 13:10:22 +1200 Subject: Consolidate vim emulation stuff into a section. Includes pane swapping, pane moving, and pane resizing. --- tmux/tmux.conf | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'tmux') diff --git a/tmux/tmux.conf b/tmux/tmux.conf index a16742bd..7a3160fd 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -29,7 +29,7 @@ unbind-key s unbind-key Tab bind-key '"' choose-window bind-key '|' split-window -h -bind-key '-' split-window -v +bind-key '_' split-window -v bind-key '/' confirm-before "kill-window" bind-key '\' confirm-before "kill-server" bind-key a send-prefix @@ -44,10 +44,6 @@ bind-key C-l select-pane -R bind-key C-n next-window bind-key C-p previous-window bind-key c new-window -bind-key h select-pane -L -bind-key j select-pane -D -bind-key k select-pane -U -bind-key l select-pane -R bind-key n next-window bind-key p previous-window bind-key s choose-session @@ -57,6 +53,24 @@ bind-key Tab select-pane -t :.+ bind-key -t vi-copy 'v' begin-selection bind-key -t vi-copy 'y' copy-selection +# Use vim-like pane growing and shrinking. +bind-key -r '<' resize-pane -L 5 +bind-key -r '>' resize-pane -R 5 +bind-key -r '+' resize-pane -U 5 +bind-key -r '-' resize-pane -D 5 + +# Use vim-like pane moving. +bind-key h select-pane -L +bind-key j select-pane -D +bind-key k select-pane -U +bind-key l select-pane -R + +# Use vim-like pane swapping. +bind-key H swap-pane -L +bind-key L swap-pane -R +bind-key J swap-pane -D +bind-key K swap-pane -U + # Terminal settings. set-option -g default-terminal "screen-256color" -- cgit v1.2.3