-
Notifications
You must be signed in to change notification settings - Fork 0
Learn VIM motion
DUONG Phu-Hiep edited this page May 5, 2024
·
9 revisions
Message | Key | More |
---|---|---|
Goto first line | gg | |
Goto End of File | G | |
Goto Line | nG | |
Show Line Number | :set nu | |
Home, End |
_ g_
|
with whitespace: 0 $
|
Word forward/backward | w b W B | |
Find char, Until char (forward, backward) |
f{char} t{char} F{char} T{char}
|
; , Jump to next and previous |
Page forward/backward | ^F ^B | |
1/2 Page down/up | ^d ^u | |
Next / Previous Block | prargraph: { }
|
phrase: ( )
|
Bookmark 'a' and jump to 'a' |
ma 'a
|
|
Jump list | Ctrl+I, Ctrl+O |
Message | Key |
---|---|
Search Forward | /text |
Search Backward | ?text |
Next | n |
Previous | N |
Replace all old with new throughout file | :%s/old/new/g |
Message | Key | Other |
---|---|---|
Select Text | v | (V: select line) |
Yank to default buffer " | y | |
Yank to buffer "a" | "ay | |
Paste from default buffer " | p | |
Paste from buffer "a" | "ap | |
Cut to default buffer " | d | |
Cut to buffer "a" | "ad |
Message | Key | Other |
---|---|---|
Undo | u | 3u: undo 3 times |
Redo | Ctrl+R |
Message | Key | Other |
---|---|---|
a | add text (after cursor) | |
i | insert text (before cursor) | |
substitute line | S | |
change in word | ciw | |
change to the next '{' | ct{ | |
change to end | c$ |
Message | Key | Other |
---|---|---|
delete current line | dd | |
yank current line | yy | |
ident line | << >> == |