VIM Basic Command (2)-Command line command

Source: Internet
Author: User

Command-line command-<:normal> This command to repeat the previous operation. He actually did not find the effect of the. command. The difference is that he can put the. effect on multiple lines in your visual mode.
For example, if you want to add a number to each line in the following text, then you can use the following method
Aaaaa
bbbb
Cc
Ddddd
The cursor is in the first line, A;<esc>, then <ctrl-v>g, and finally in: normal. It's OK. Of course, in the mode, you use the command line, you will find the format of the command line as follows
: <, ' > It represents the selected row.
Of course, we can also change the above. command to a more direct command A; a SELECT command that represents the scope of the operation, or a different range representation instead of%, so the command becomes the following
:%normal A;

Command mode, if we want to copy the string under the current cursor to the command line, we can use the <C-r><C-w> on the line. This command feels the most use of the situation, it should be to replace a word when the > is more useful.

VIM Basic Command (2)-Command line command

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.