.tmux/vim-keys.conf

Mon, 12 Jun 2017 17:20:38 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 12 Jun 2017 17:20:38 -0400
changeset 601
c1615fda063a
parent 406
5465634eb01c
permissions
-rw-r--r--

smarter jk maps

402
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 # $Id: vim-keys.conf,v 1.2 2010-09-18 09:36:15 nicm Exp $
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2 #
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 # vim-keys.conf, v1.2 2010/09/12
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 #
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5 # By Daniel Thau. Public domain.
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 #
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 # This configuration file binds many vi- and vim-like bindings to the
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 # appropriate tmux key bindings. Note that for many key bindings there is no
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 # tmux analogue. This is intended for tmux 1.3, which handles pane selection
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10 # differently from the previous versions
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 # split windows like vim
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13 # vim's definition of a horizontal/vertical split is reversed from tmux's
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 bind s split-window -v
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 bind v split-window -h
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 # move around panes with hjkl, as one would in vim after pressing ctrl-w
406
5465634eb01c make vim bindings repeatable
Meredith Howard <mhoward@roomag.org>
parents: 402
diff changeset
18 bind -r h select-pane -L
5465634eb01c make vim bindings repeatable
Meredith Howard <mhoward@roomag.org>
parents: 402
diff changeset
19 bind -r j select-pane -D
5465634eb01c make vim bindings repeatable
Meredith Howard <mhoward@roomag.org>
parents: 402
diff changeset
20 bind -r k select-pane -U
5465634eb01c make vim bindings repeatable
Meredith Howard <mhoward@roomag.org>
parents: 402
diff changeset
21 bind -r l select-pane -R
402
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
22
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
23 # resize panes like vim
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
24 # feel free to change the "1" to however many lines you want to resize by, only
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
25 # one at a time can be slow
406
5465634eb01c make vim bindings repeatable
Meredith Howard <mhoward@roomag.org>
parents: 402
diff changeset
26 bind -r < resize-pane -L 3
5465634eb01c make vim bindings repeatable
Meredith Howard <mhoward@roomag.org>
parents: 402
diff changeset
27 bind -r > resize-pane -R 3
5465634eb01c make vim bindings repeatable
Meredith Howard <mhoward@roomag.org>
parents: 402
diff changeset
28 bind -r - resize-pane -D 3
5465634eb01c make vim bindings repeatable
Meredith Howard <mhoward@roomag.org>
parents: 402
diff changeset
29 bind -r + resize-pane -U 3
402
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
30
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
31 # bind : to command-prompt like vim
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
32 # this is the default in tmux already
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
33 bind : command-prompt
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
34
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
35 # vi-style controls for copy mode
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
36 setw -g mode-keys vi
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
37

mercurial