You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In tmux, hit the prefix `ctrl+b` (my modified prefix is ctrl+a) and then:
67
+
In `tmux`, hit the prefix <kbd>ctrl</kbd> + <kbd>b</kbd> and then:
32
68
33
69
## Sessions
34
70
35
71
:new<CR> new session
36
-
s list sessions
37
-
$ name session
72
+
<kbd>s</kbd> list sessions
73
+
<kbd>$</kbd> name session
38
74
39
75
## Windows (tabs)
40
76
41
-
c create window
42
-
w list windows
43
-
n next window
44
-
p previous window
45
-
f find window
46
-
, name window
47
-
& kill window
77
+
<kbd>c</kbd> create window
78
+
<kbd>w</kbd> list windows
79
+
<kbd>n</kbd> next window
80
+
<kbd>p</kbd> previous window
81
+
<kbd>f</kbd> find window
82
+
<kbd>,</kbd> name window
83
+
<kbd>&</kbd> kill window
48
84
49
85
## Panes (splits)
50
86
51
-
% vertical split
52
-
" horizontal split
87
+
<kbd>%</kbd> vertical split
88
+
<kbd>"</kbd> horizontal split
89
+
53
90
54
-
o swap panes
55
-
q show pane numbers
56
-
x kill pane
57
-
+ break pane into window (e.g. to select text by mouse to copy)
58
-
- restore pane from window
59
-
⍽ space - toggle between layouts
60
-
<prefix> q (Show pane numbers, when the numbers show up type the key to goto that pane)
61
-
<prefix> { (Move the current pane left)
62
-
<prefix> } (Move the current pane right)
63
-
<prefix> z toggle pane zoom
64
-
65
-
## <aname="syncPanes"></a>Sync Panes
91
+
<kbd>o</kbd> swap panes
92
+
<kbd>q</kbd> show pane numbers
93
+
<kbd>x</kbd> kill pane
94
+
<kbd>+</kbd> break pane into window (e.g. to select text by mouse to copy)
95
+
<kbd>-</kbd> restore pane from window
96
+
<kbd>⍽</kbd> space - toggle between layouts
97
+
<prefix> <kbd>q</kbd> (Show pane numbers, when the numbers show up type the key to goto that pane)
98
+
<prefix> <kbd>{</kbd> (Move the current pane left)
99
+
<prefix> <kbd>}</kbd> (Move the current pane right)
100
+
<prefix> <kbd>z</kbd> toggle pane zoom
101
+
102
+
## Sync Panes
66
103
67
104
You can do this by switching to the appropriate window, typing your Tmux prefix (commonly Ctrl-B or Ctrl-A) and then a colon to bring up a Tmux command line, and typing:
68
105
69
-
```
106
+
```bash
70
107
:setw synchronize-panes
71
108
```
72
109
@@ -93,13 +130,15 @@ You can also resize panes if you don’t like the layout defaults. I personally
93
130
94
131
Pressing PREFIX [ places us in Copy mode. We can then use our movement keys to move our cursor around the screen. By default, the arrow keys work. we set our configuration file to use Vim keys for moving between windows and resizing panes so we wouldn’t have to take our hands off the home row. tmux has a vi mode for working with the buffer as well. To enable it, add this line to .tmux.conf:
95
132
96
-
setw -g mode-keys vi
133
+
```bash
134
+
setw -g mode-keys vi
135
+
```
97
136
98
-
With this option set, we can use h, j, k, and l to move around our buffer.
137
+
With this option set, we can use <kbd>h</kbd>, <kbd>j</kbd>, <kbd>k</kbd>, and <kbd>l</kbd> to move around our buffer.
99
138
100
-
To get out of Copy mode, we just press the ENTER key. Moving around one character at a time isn’t very efficient. Since we enabled vi mode, we can also use some other visible shortcuts to move around the buffer.
139
+
To get out of Copy mode, we just press the <kbd>ENTER</kbd> key. Moving around one character at a time isn’t very efficient. Since we enabled vi mode, we can also use some other visible shortcuts to move around the buffer.
101
140
102
-
For example, we can use "w" to jump to the next word and "b" to jump back one word. And we can use "f", followed by any character, to jump to that character on the same line, and "F" to jump backwards on the line.
141
+
For example, we can use <kbd>w</kbd> to jump to the next word and <kbd>b</kbd> to jump back one word. And we can use <kbd>f</kbd>, followed by any character, to jump to that character on the same line, and <kbd>F</kbd> to jump backwards on the line.
0 commit comments