Common vi editing commands and vi editing
It's really hard to remember so much in your blog. It's okay to repeat it from time to time.
From: http://www.cnblogs.com/junw_china/articles/1708967.html
Cursor control
Content editing
A: Append content to the end of the current row
I: insert content before the cursor
I: insert content after the cursor
O: add content under the row where the mouse is located
O: add content to the row where the cursor is located
ESC: exit the editing mode.
Ctrl-T: Move to the next tab
Backspace: move one character backward
Ctrl-U: Delete the current
Cw: Delete the character of the cursor and enter the editing mode.
Cc: Delete the row where the cursor is located and enter the editing mode.
C: Delete the characters from the cursor position to the end of the row and enter the editing mode.
Dd: Delete the current row.
NDd: Delete row n
D: Delete the characters after the cursor position of the current row.
Dw: Delete the character of the zip code
D}: Delete the remaining characters in the current segment
D ^: Delete the characters from the beginning of the row before the cursor.
C/Pat: Delete the content between the cursor and the first matching character
Dn: Delete the content between the cursor and the next matching character
DfA: Delete the content from the cursor of the current row to the matched characters (matched characters will also be deleted)
DtA: Delete the content between the cursor of the current row and matching characters (matched characters are not deleted)
DL: Delete content from the cursor to the last line of the screen
DG: Delete the content from the cursor to the end of the file.
J: link the content of the upper and lower lines
P: insert buffer content behind the cursor
P: insert buffer content before the cursor
RX: Replace characters with x
RText: Replace the cursor with text
U: undo the last change
U: restores the content of the current row.
X: remove the characters from the cursor's position.
X: remove the character before the cursor.
NX: Delete the first n characters. The characters in the cursor will not be deleted.
.: Restore the last change
~ : Reverse the case of letters
Y: copy the current row to the new buffer.
Yy: copy the current row
"XYy: copy the buffer named x of the current row.
Ye: copy it to the end of a word.
File Operations