001 Embedded Childhood VIM common commands

Source: Internet
Author: User

1, the command line mode: Just enter the VIM mode, the mode can move the cursor to browse, you can delete the whole row, etc., but unable to edit the text, the mode of the function keys are:

(1) YY: Copy the current cursor in the row

(2) [N]yy:n is a number that duplicates the n rows at the beginning of the current cursor

(3) P: Paste the copied content to the next line of the cursor

(4) DD: Deletes the current cursor in the row

(5) [N]DD: Delete n rows starting at the current cursor line

(6)/name: Search for a string named "name" after the cursor

(7) G: Cursor moves to end of file (note is uppercase)

(8) U: cancels the previous action (note is lowercase)

(9) Skip to the specified line: line number +g

(10) Jump to the first line of the first character: GG

(11) Skip to the end of the current line: $

(12) Skip to the beginning of the current line: 0 (0)

2, enter "I" in the command line mode, enter the insertion mode, press "ESC" to return to the command line mode;

3, the bottom line mode: When vim processing command line mode, by typing ": (colon)" into the bottom row mode, the user can do file saving or exit operation, you can also set the editing environment, such as looking for strings, listing line numbers, the function keys are as follows:

(1): W Save

(2): Q Quit Vim (the system will prompt to save the changes)

(3): q! Forced exit (do not save for modification)

(4): Exit after Wq save

(5): w [filename] file saved as filename (there is a space between W and filename)

(6): Set NU display line number

(7): Set Nonu Cancel line number

(8):/String to find

001 Embedded Childhood VIM common commands

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.