aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/cheat/tmux
blob: 161e4ffd626a7fb1b9ba4a5c6c4dfbbdb56238e7 (plain)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# Start tmux:
tmux

# Prefix == Ctrl-b or Ctrl-w

# Detach from tmux:
Prefix d

# Restore tmux session:
tmux attach

# Detach an already attached session (great if you are moving devices with different screen resolutions)
tmux attach -d 

# Display session:
tmux ls

# Rename session:
Prefix $

# Switch session:
Prefix s

# Start a shared session:
tmux -S /tmp/your_shared_session
chmod 777 /tmp/your_shared_session

# Help screen (Q to quit):
Prefix ?

# Scroll in window:
Prefix PageUp/PageDown

# Reload configuation file
Prefix : source-file /path/to/file

# lauch command
Prefix :

# Zoom in tab
Prefix z

# Open pane in the current directory (alias configured)
# Vertical
Prefix _
# Horizontal
Prefix /

# Toggle recording terminal into a file
Prefix P

# Window management
# =================

# Create window:
Prefix c

# Destroy window:
Prefix &

# Switch between windows:
Prefix [0-9]
or
Prefix Arrows

# Split windows horizontally:
Prefix %

# Split windows vertically:
Prefix "

# Turn a pane into a Window
Prefix !

# Pane management
# ===============

# kill pane
Prefix x

# Buffer with vim keys
# ====================

# jump to next word
w

# jump back one word
b

# jump to the next character
f <char>

# move one page up
Ctrl-b

# move one page down
Ctrl-f

# Search in buffer (use <n> and <N>)
?

# For search downward
/

# Select some text
# Use <Enter> to quit and copy selected text in buffer
space

# paste content captured
Prefix ]

# commands
# ========

# Copy the entire visible contents pane to the paste buffer
capture-pane

# show the content of the paste buffer
show-buffer

# list all pasted buffer
list-buffers

# Choos a buffer and past
choose-buffer

# Turn Window into a pane, take window of a session and join it to the current
# session
join-pane <session_name>:<window_id>

# Mouve pane to another window
join-pane -s <session_name>:<window_id>.<pane_id>

# Move pane from pane to another
join-pane -s <session_name>:<window_id>.<pane_id> <session_name>:<window_id>

# Move window between sessions
move-window -s <session_name>:<session_id> -t <session_id>

# Multi user
# ==========

# For use multi user you must make different session for have habilty to
# seperate window

# first create a simple session
tmux new-session -s groupedsession

# And connect to it with another session
tmux new-session -t groupedsession -s mysession

# Session management
# ==================

# Switch between session
# Go to previous section
Prefix (
# Go to next section
Prefix )

# Display list of sessions
Prefix s

# Move window betweeb sessions
Prefix . <session_name>