.tmux/screen-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 402
cb0889a78173
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: screen-keys.conf,v 1.7 2010-07-31 11:39:13 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 # By Nicholas Marriott. Public domain.
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 # This configuration file binds many of the common GNU screen key bindings to
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 # appropriate tmux key bindings. Note that for some key bindings there is no
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 # tmux analogue and also that this set omits binding some commands available in
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 # tmux but not in screen.
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 #
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10 # Note this is only a selection of key bindings and they are in addition to the
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11 # normal tmux key bindings. This is intended as an example not as to be used
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 # as-is.
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 # Set the prefix to ^A.
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 unbind C-b
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16 set -g prefix ^A
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 bind a send-prefix
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
19 # Bind appropriate commands similar to screen.
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
20 # lockscreen ^X x
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
21 unbind ^X
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
22 bind ^X lock-server
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
23 unbind x
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
24 bind x lock-server
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
25
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
26 # screen ^C c
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
27 unbind ^C
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
28 bind ^C new-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
29 unbind c
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
30 bind c new-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
31
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
32 # detach ^D d
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
33 unbind ^D
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
34 bind ^D detach
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
35
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
36 # displays *
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
37 unbind *
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
38 bind * list-clients
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
39
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
40 # next ^@ ^N sp n
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
41 unbind ^@
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
42 bind ^@ next-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
43 unbind ^N
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
44 bind ^N next-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
45 unbind " "
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
46 bind " " next-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
47 unbind n
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
48 bind n next-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
49
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
50 # title A
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
51 unbind A
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
52 bind A command-prompt "rename-window %%"
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
53
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
54 # other ^A
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
55 unbind ^A
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
56 bind ^A last-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
57
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
58 # prev ^H ^P p ^?
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
59 unbind ^H
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
60 bind ^H previous-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
61 unbind ^P
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
62 bind ^P previous-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
63 unbind p
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
64 bind p previous-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
65 unbind BSpace
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
66 bind BSpace previous-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
67
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
68 # windows ^W w
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
69 unbind ^W
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
70 bind ^W list-windows
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
71 unbind w
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
72 bind w list-windows
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
73
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
74 # quit \
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
75 unbind '\'
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
76 bind '\' confirm-before "kill-server"
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
77
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
78 # kill K k
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
79 unbind K
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
80 bind K confirm-before "kill-window"
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
81 unbind k
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
82 bind k confirm-before "kill-window"
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
83
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
84 # redisplay ^L l
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
85 unbind ^L
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
86 bind ^L refresh-client
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
87
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
88 # split -v |
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
89 unbind |
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
90 bind | split-window
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
91
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
92 # :kB: focus up
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
93 unbind Tab
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
94 bind Tab select-pane -t:.+
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
95 unbind BTab
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
96 bind BTab select-pane -t:.-
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
97
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
98 # " windowlist -b
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
99 unbind '"'
cb0889a78173 Split screen and vim keybinds into files
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
100 bind '"' choose-window

mercurial