Vim Learning Notes

Source: Internet
Author: User

    • Lesson 1.1 Moving the cursor

1, h, move the cursor to the left;

2, L, move the cursor to the right;

3, J, move the cursor downward;

4, k, the cursor upward movement;

5, the operation of the above moving cursor needs to be carried out in normal mode;

6, in the use of HJKL at the same time, keyboard keys are also the same effect;

    • Lesson 1.2 exiting Vim

1, <esc>, enter the normal mode;

2,: q!, do not save the modified content to exit vim;

    • Lesson 1.3 Deleting an action

1, x, delete the characters under the cursor;

    • Lesson 1.4 Text Editing-inserting operations

1, I, into the insertion mode;

    • Lesson 1.5 text Editing-Append operations

1, a, at the end of the line of the cursor is appended;

2, a, in the current position of the cursor is appended;

    • Lesson 1.6 Editing files

1,: Wq, save the file and exit;

    • Lesson 1 Summary

1, move the cursor using the arrow keys or hjkl,h (left), J (Down), K (UP), K (right);

2. Use Vim to edit files under Shell, Vim FILENAME <ENTER>;

3. Exit Vim,<esc>: q! <ENTER> do not save exit;<esc>: Wq <ENTER> Save exit;

4, delete the characters under the cursor, X;

5, insert or append text, i insert text <ESC>, insert in front of the cursor, a append text <esc>, append at line end, a append text <esc>, append to the cursor;

6, <esc>, enter the normal mode or cancel the part you do not want to complete the data;

    • Lesson 2.1 Deleting commands

1, DW, delete the word where the cursor is located;

    • Lesson 2.2 More Delete commands

1, d$, delete the cursor at the end of the content;

    • Course 2.3 operator and schematic

1, D motion;

2, D is the deletion operation;

3, motion is the intention of operator operation;

4, W, positioning to the beginning of the next word, the cursor is positioned to the first character of the next word;

5, E, position the cursor at the end of the word, the cursor is positioned to the last character of the word;

6, $, position the cursor at the end of the line, the cursor is positioned to the last character at the end of the line;


This article from the "Bowl sale Five Ginger" blog, reproduced please contact the author!

Vim Learning Notes

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.