-
Notifications
You must be signed in to change notification settings - Fork 0
/
useful_cheats.txt
102 lines (85 loc) · 2.97 KB
/
useful_cheats.txt
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
Tmux Std
$ name session
c new window
, name window
w list windows
f find window
& kill window
. move window - prompted for a new number
:movew<CR> move window to the next unused number
Tmux Plugins
#Tmux copycat
prefix + / - regex search
n - jumps to the next match
N - jumps to the previous match
To copy a highlighted match:
Enter - if you're using Tmux vi mode
ctrl-w or alt-w - if you're using Tmux emacs mode
#Tmux Yank
y - copy selection to system clipboard
Mouse Support: press y before releasing mouse.
#Tmux Resurrect
prefix + Ctrl-s - save
prefix + Ctrl-r - restore
#Tmux open
o - "open" a highlighted selection with the system default program. open for OS X or xdg-open for Linux.
Ctrl-o - open a highlighted selection with the $EDITOR
#Tmux Logging
Logging: Key binding: prefix + shift + p (start/stop)
"Screen capture": Key binding: prefix + alt + p
Save complete history: Key binding: prefix + alt + shift + p
#Tmux Pain Control
##Navigation
prefix + h and prefix + C-h
select pane on the left
prefix + j and prefix + C-j
select pane below the current one
prefix + k and prefix + C-k
select pane above
prefix + l and prefix + C-l
select pane on the right
##Resizing panes
prefix + shift + h
resize current pane 5 cells to the left
prefix + shift + j
resize 5 cells in the up direction
prefix + shift + k
resize 5 cells in the down direction
prefix + shift + l
resize 5 cells to the right
##Splitting panes
prefix + |
split current pane horizontally
prefix + -
split current pane vertically
##Swapping windows
prefix + < - moves current window one position to the left
prefix + > - moves current window one position to the right
#Tmux sessionist
prefix + g - prompts for session name and switches to it. Performs 'kind-of' name completion.
Faster than the built-in prefix + s prompt for long session lists.
prefix + C (shift + c) - prompt for creating a new session by name.
prefix + X (shift + x) - kill current session without detaching tmux.
prefix + S (shift + s) - switches to the last session.
The same as built-in prefix + L that everyone seems to override with some other binding.
prefix + @ - promote current pane into a new session.
Analogous to how prefix + ! breaks current pane to a new window.
#Tmux urlview
Dep(Ubuntu): sudo apt-get install urlview
u - "urlview" for a side-panel listing all urls
#Tmux fpp
Dep(Ubuntu): https://github.com/facebook/PathPicker/releases/download/0.6.1/fpp.deb
f - "fpp" for a new window with a Facebook PathPicker selection of your tty.
#VIM
[count]\cc |NERDComComment|
Comment out the current line or text selected in visual mode.
[count]\cn |NERDComNestedComment|
Same as \cc but forces nesting.
[count]\c |NERDComToggleComment|
Toggles the comment state of the selected line(s). If the topmost selected line is commented, all selected lines are uncommented and vice versa.
#Navigator (vim-tmux-navigator)
<ctrl-h> => Left
<ctrl-j> => Down
<ctrl-k> => Up
<ctrl-l> => Right
<ctrl-\> => Previous split