forked from yoesoff/vimrc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvim-cheatsheet.txt
More file actions
47 lines (36 loc) · 1.01 KB
/
Copy pathvim-cheatsheet.txt
File metadata and controls
47 lines (36 loc) · 1.01 KB
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
Vim cheatsheet
* Navigation
A - to move to the end of the line and switch to editing
I - to move to the beginning of the line and switch to editing
* Delete
dw - delete forward
db - delete backward
d0 - delete current to beginning
d$ - will delete from current position to end of line
dd - cut
* Grepper
grep -irn 'your_string_data' **/*.php
:lgrep 'quiz_result' **/*.php
* find file by name
find . -name '*User.php'
* replace string
:4,15s/character/string/g
* List of Buffers
:e# / :bn - Buka buffer sebelumnya
:e#n / :buff 4 / :b1 - Buka buffer. (n = 1,2,3,..)
:nbw / :nbw!:q / \q - Remove n buffer
New buffer
:new - will create a split window with an unnamed buffer.
:enew - will open one in the current window.
Suspend Process
ctrl + z - Minimize VIM
jobs - List suspended jobs
fg %x - Open specific jobs
kill %x - Kill specific jobs
Fold Function
zo - opens folds
zc - closes fold
zm - increases auto fold depth
zr - reduces auto fold depth
Reveal current File
:NERDTreeFind