From 38ee1e66aa50512ee8b78af721d41280e32ab31f Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 17 Jan 2010 16:24:09 +0000 Subject: Add vim-style key bindings file from Daniel Thau. --- examples/vim-keys.conf | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 examples/vim-keys.conf (limited to 'examples') diff --git a/examples/vim-keys.conf b/examples/vim-keys.conf new file mode 100644 index 00000000..38d0570d --- /dev/null +++ b/examples/vim-keys.conf @@ -0,0 +1,35 @@ +# $Id: vim-keys.conf,v 1.1 2010-01-17 16:24:09 nicm Exp $ +# +# vim-keys.conf, v1.0 2010/01/15 +# +# By Daniel Thau. Public domain. +# +# This configuration file binds many vi- and vim-like bindings to the +# appropriate tmux key bindings. Note that for many key bindings there is no +# tmux analogue. + +# split windows like vim +# vim's definition of a horizontal/vertical split is reversed from tmux's +bind s split-window -v +bind v split-window -h + +# move around panes with j and k, a bit like vim +# as of tmux 1.1, there is no way to move based on pane position (ie, no way to +# move the pane to the right) +bind j down-pane +bind k up-pane + +# resize panes like vim +# feel free to change the "1" to however many lines you want to resize by, only +# one at a time can be slow +bind < resize-pane -L 1 +bind > resize-pane -R 1 +bind - resize-pane -D 1 +bind + resize-pane -U 1 + +# bind : to command-prompt like vim +# this is the default in tmux already +bind : command-prompt + +# vi-style controls for copy mode +setw -g mode-keys vi -- cgit v1.2.3