summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2010-01-17 16:24:09 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2010-01-17 16:24:09 +0000
commit38ee1e66aa50512ee8b78af721d41280e32ab31f (patch)
treee05f645341f2c8e14bc6c66b4aedd05ebdc09724 /examples
parent796ae34f2fbddcfbfd09523b2b3ac24d1136db0f (diff)
Add vim-style key bindings file from Daniel Thau.
Diffstat (limited to 'examples')
-rw-r--r--examples/vim-keys.conf35
1 files changed, 35 insertions, 0 deletions
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