-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux
103 lines (81 loc) · 2.71 KB
/
tmux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
tmux set-option status-fg white
tmux set-option status-fg black
^A[ to get into copy mode
use vi keys to navigate
<space> to mark one end of text to copy
use vi keys to navigate
<return> to mark other end of text to copy (including character that cursor is on)
q quit copy mode
g goto top line
G goto bottom line
? search backwards
n next keyword appearance???
N previous keyword appearance???
<ESC> clear selection
^A] to paste
:setw -g mode-keys vi
:show-buffer display buffer_0 contents
:capture-pane copy entire visible contents of pane to a buffer
:list-buffers list all buffers
:choose-buffer list all buffers and paste selected buffer
:save-buffer foo save buffer to file 'foo'
:delete-buffer -b 1 delete buffer_1
###############################################################################
http://www.tmuxcheatsheet.com/
tmux info ;# shows much info: clients, sessions, windows, panes, term stuff
^A: enter command mode
^A? show shortcuts
###############################################################################
sessions
tmux a
tmux at
tmux attach
tmux attach-session
tmux a -t mysession
tmux at -t mysession
tmux attach -t mysession
tmux attach-session -t mysession
tmux ls
tmux list-sessions
^As show sessions
^A$ rename session
^Ad detach from sessions
^A( move to previous session
^A) move to next session
###############################################################################
windows
^Ac create window
^A, rename current window
^Ap goto previous window
^An goto next window
^A0 goto window 0
^A9 goto window 9
:select-window -t :n
where n is window number, which may be >= 10
^A& close current window
swap windows number 2 and 1
:swap-window -s -2 -t 1
###############################################################################
panes
^A; switch to last active pane
^A% split pane vertically
^A" split pane horizontally
^A{ move current pane "left"
^A} move current pane "right"
^Ao switch to next pane
^Aq briefly show pane numbers
(then quickly type a number to switch to that pane)
^Az toggle panel zoom (make pane full size)
^A! convert pane to a window
^A<arrowkey> switch to adjacent pane (long delay between ^A and arrowkey)
^A<arrowkey> resize current pane (very short delay between ^A and arrowkeys)
^A<space> toggle (cycle?) between pane layouts
^Ax close pane
###############################################################################
misc
^At show clock
^A? show shortcuts
:set -g OPTION set OPTION for all sessions
:setw -g OPTION set OPTION for all windows (of current session?)
https://gist.github.com/MohamedAlaa/2961058
https://gist.github.com/andreyvit/2921703