Shortcut keys for the VIM editor
(i) in command mode
To move the cursor:
Move front and back: H move forward one unit in the same line L backward
Move up and down: K move J up one line down
HL can only move one unit, inconvenient
Number 0 moves to the beginning of the line
$ End of line
The movement of a word
W move right to the beginning of a word B move forward the beginning of a word
Turn the page (using the usual method)
PageUp
PageDown
R replacement
Action: Enter r and enter characters, but only one character can be entered
Delete a character:
X
DW Delete A word amount for the current cursor
d$ Delete current cursor to end of line
DD Delete entire line
(Deleted text will also be saved in the buffer, after pasting can be used,)
Y generally means replication
YY Copy a row
YW copy a word
y$ Copy the current cursor to the end of the line
P Paste
DD P is equivalent to clipping (deleted, then move cursor, paste back)
In the delete, copy these shortcuts to the front plus numbers, you can manipulate multiple lines
3DD p Clip 3 lines
4yy P
For cursor navigation shortcut keys, you can also add a number eg:3w move three words in volume 10l move backwards by 10 characters
Undo and Redo (equivalent to Ctrl +z ctrl+y in Windows)
U undo
Ctrl+r Redo
(b) in the last line mode :
: s/old/new/the first matching character in the current row is replaced
: S/old/new/g plus G, the matching characters in a row are replaced
: 1,3s/old/new/The number of rows is limited to 1, 3 rows
:%s/old/new/g to the entire text bank
: W file name the currently written text is written to another file (such as a new file does not exist)
: w! FileName If the file already exists, w! will force overwrite the new file
: R file name loads a file into the current
The VIM Editor's shortcut keys are used