-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathtmux
99 lines (68 loc) · 1.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
---
tags: [ tmux ]
---
# To install tmux:
sudo apt install tmux
vim ~/.zshrc
and add some configurations at the begining of the file:
[[ "$TERM_PROGRAM" != "vscode" ]] && [[ "$TERMINAL_EMULATOR" != "JetBrains-JediTerm" ]] && [[ "$TERM" != "screen" ]] && [[ -z "$TMUX" ]] && { tmux attach || exec tmux new-session && exit; }
export TERM="xterm-256color"
# To install plugins:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
vim ~/.tmux.conf
add some configurations:
set -g prefix C-Space
set -g default-shell /bin/zsh
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'jimeh/tmux-themepack'
set -g @themepack 'powerline/default/cyan'
run -b '~/.tmux/plugins/tpm/tpm'
restart terminal and activate them using next command:
tmux source ~/.tmux.conf
and use next shortcuts combination:
Ctrl-Space + I
# To split horizontal:
Ctrl-Space + "
# To split vertical:
Ctrl-Space + %
# To move between panels:
Ctrl-Space + arrows
# To change panel size:
Ctrl-Space + Ctrl-arrows
# To close panel:
Ctrl-Space + x
or
Ctrl + d
# To zoom in or out over a panel:
Ctrl-Space + z
# To activate copy mode (activate mouse scroll):
Ctrl-Space + [
# To close copy mode:
Ctrl + c
# To create new window:
Ctrl-Space + c
# To move to previous window:
Ctrl-Space + p
# To move to next window:
Ctrl-Space + n
# To move to specific window:
Ctrl-Space + 0-9
# To show windows menu:
Ctrl-Space + w
# To kill window (also killing all panels):
Ctrl-Space + :
kill-w -t <0-9>
# To create a new session:
Ctrl-Space + :
new-s
# To kill session:
Ctrl-Space + :
kill-ses -t 0-9
# To move to previous session:
Ctrl-Space + (
# To move to next session:
Ctrl-Space + )
# To show sessions:
Ctrl-Space + s
# To kill all:
tmux kill-server