Implementation of the Linuxvim select all function
Source: Internet
Author: User
The implementation of the Linuxvim all-choice function has also been found to see if there are any quick methods to select all, but many of them are repeated and incorrect on the Internet, such as: 1, $ y. What is this? If you want to write it, you must also write it as: 1, $ y. But I tell you, if you write it as: 1, $ y is all copied, not all selected dG. this is even more misleading...
The implementation of the Linux vim all-choice function has also been found to see if there are any quick methods to select all, but many of them are repeated and incorrect on the Internet, such as: 1, $ y. What is this? If you want to write it, you must also write it as: 1, $ y. But I tell you, if you write it as: 1, $ y, all copies, not all selects dG. this is even more misleading, this is where 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) is pulled.
The correct command is: ggVG
Explain the above commands
Gg moves the cursor to the first line, which is valid only in vim. in vi, invalid V enters Visual (Visual) mode. G moves the cursor to the last line www.2cto.com and you can perform other operations. for example: d delete selected content y copy selected content to register 0 "+ y copy selected content to register +, that is, the system clipboard, for other programs to use the column from csh159
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.