-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvim.notes
More file actions
42 lines (31 loc) · 960 Bytes
/
vim.notes
File metadata and controls
42 lines (31 loc) · 960 Bytes
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
q: -> Command Line History
q/ -> Search History
ctrl+f -> Command Line to Command Line History window
C-N / C-P on : and / modes (instead of up/down)
%:h -> expands to current file's directory
:w !sudo tee %
W / B / E / gE: WORDS
, -> reverse of ;
t -> 'tag' <b>value</b>
s -> 'sentence'
p -> 'paragraph'
mm `m -> create mark m, jump to it.
`. -> last change
`^ -> last insertion
`[ -> start of last change or yank
`] -> end of last change or yank
`< -> start of last visual selection
`> -> end of last visual selection
`` -> position before last jump
H / M / L -> Jump to top / middle / bottom of screen
zt / zz / zb -> redraw with cursor at top / center / bottom
C-E / C-Y -> scroll up / down (without moving cursor)
Revisit plugin: surround.vim
registers:
"" unnamed (default)
"0 yank
"_ black hole
"+ clipboard
"* mouse selection
gp & gP: same as p & P but leaves cursor at end of pasted text
%s///gn count the matches for the current pattern