I was also looking for a quick way to select all, but many of them are repeated and incorrect on the Internet, such:
1, $ y, what is this? To write, you must also write: 1, $ y, but I tell you, write: 1, $ Y is all copied, not all selected
DG. This is even more misleading. This is to delete the content from the row where the cursor is located to the last line (including the content of the row where the cursor is located)
Where Has everything been mentioned above. The correct answer is:
Ggvg
Explain the above commands
Gg moves the cursor to the first line, which is valid in vim and invalid in VI.
V is used to enter the visual mode.
G move cursor to the last line
After the selected content is selected, you can perform other operations, such:
D. Delete the selected content.
Y: copy the selected content to register 0.
"+ Y copy the selected content to the + register, that is, the system clipboard, for otherProgramUse
I hope that you will not resend the post very unresponsibly.