The command technique in VI
File copy in the diffrent file:
"A9yy @don ' t forget", A is variable name,9 be copy lines, yy is copy
"AP @don ' t forget the", A is variable name,p is paste
YY @copy the current line
P @paste
DD @delete the current line
Nyy @copy N Lines
NDD @delete N Lines
D) @Delete the beginning of the next sentence
D} @Delete the beginning of the next paragraph
”
: Set nu @don ' t forget the:, Display line numbers
: Set Nonu @don ' t forget the:, Undisplay line numbers
Shift + G @jump to the last line
SHIFT + U @return last State
"^" Jump: Quickly jump the cursor to the line of the line at the beginning of the character;
"$" Jump: Quickly jump the cursor to the line trailing characters;
VI There is an order I add here: I was also a chance to find out, really good. When we use the YY command to copy in this file, you cannot copy it to another file, which is more convenient than using the Clipboard command.
Press Nyy in hello1.c to copy the text you want to copy, and then enter the command: E./hello2.c this is to jump to the hello2.c this file, and then press p can be pasted to the place you want to paste. (for text operations must be text is only saved state, E can be the root of the directory after the file)
If the actual effect is not very good please refer to the original: http://blog.csdn.net/qq_21792169/article/details/49893919