Common Commands of VI Editor
Order | usage meaning |
---|---|
dd | Delete the entire line where the cursor is located |
d1G | Delete all data from the cursor to the first line |
dG | Delete all data from the cursor to the last line |
d$ | Delete where the cursor is, to the last character of the line |
d0 | That is the number 0, delete the character from the cursor to the front of the line |
x,X | X deletes a character backward (equivalent to the [del] key), and X deletes a character forward (equivalent to [backspace], the backspace key) |
nx | n is a number, delete n characters consecutively backward |
capital i | insert |
lowercase c | replace |
lowercase x | delete |
When linux edits large text information, block operations are often used to ctrl+v
cut and paste. Press "ctrl+v"
to select text, press "d", cut the column, move the cursor position, and press "p" to paste