-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes-me.txt
66 lines (53 loc) · 2.01 KB
/
notes-me.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
'0 - open previous file (nice after relaunch)
:set all - show all values
:set foo? - show value of foo
:set foo& - reset foot to default value
:earlier 15m - go back in time 15 minutes
:later 15m - reverses :earlier
# commands
CTRL + f - change to command-line window during a command
:bufdo {cmd} - repeat command for each buffer in the list
:,!command - command output replaces current line
:r!command - command output on new line
:%!filter - put whole file through filter
:!filterput - put (visual) selection through filter
:opt - view the list of options
:g/something/y A - yank all lines matching something into register A
# editing
I - insert at begining of line
X - delete character before cursor
# ex prompt
:%!ruby -pe "gsub /classA/, 'classB'"
# g-commands
g; | g, - move forward/backword through changelist
gq | gw - hard wrap {motion} and move cursor to the end of the selection | keep cursor where it was
g+ | g- - go forward/backword through undolevels
<C-o> / <C-i> - move forward/backwards through jumplist
# history
q/ - search history
q: - command history
# marks
'' - move to previous mark
`a - move to line AND column of mark a
# movement
ge / gE - skip backwards at the ending of the words
# repeating
; | , - repeat latest f, t, F, T in the normal | opposite direction
@: - repeat the previous command-line command
# registers
<C-r>0 - paste text from register 0 in insert mode
<C-r><C-p>0 - paste text w/ proper indentation
" - unnamed register (yank and execute macro @")
0 - most recently yanked text
1 to 9 - historic delete registers
_ - black hole register
- - small delete register (any change one line or less)
. - last text inserted register
% - current filename register
= - expression register
: | / - last command | last search register
+ | * - system clipboards
# searching
/ CTRL + P, CTRL + N - move through the search history while searching
# visual
gv - reselects the last selection