Composite command a is equivalent to $

Source: Internet
Author: User

Time: 2014.06.28

Location: Base

-------------------------------------------------------------------------------

I. Brief Introduction

A composite command corresponds to two or more sub-commands, which encapsulates multiple sub-operations.

Generally, we want to add some common operations after many lines. For example, to add a semicolon at the end of each line of code in a program, we know that$ Command to move the cursor to the end of the current rowAnd thenUse the command to insert the cursor after the current cursor position (I is inserted before the current cursor)And then exit from Esc. If you want to re-execute this modification, because the last operation record here is: [A; ESC] Three buttons, so we have to move the end of the line to be modified and then execute the command to achieve the goal, that is, every time J $.

-------------------------------------------------------------------------------

2. Use compound operations

During the above operation, the modification operation corresponding to the command is equivalent to the three key operations of [a; ESC]. j moves the cursor down a line (not the modification operation) $ makes it positioned at the end of the line. Such a modification involves a lot of buttons. What's simpler is to use compound commands.A. It performs the insert operation at the end of the row where the current cursor is located,Then a is added; and ESC three buttons can form a modification unit. Next we only need to use J to move down a line and then execute the command, which is much more convenient. That is, one move operation, and one command operation can be performed multiple times to add characters at the end of each line.

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.