VIM basics of Linux Commands

Source: Internet
Author: User
Linux command-VIM Basics 1. Basic operations: 1. switch normal mode and edit mode through ESC and I keys www.2cto. com2. X & amp; rarr; delete the character of the current cursor. 3. : Wq & amp; rarr; save disk + exit (w save disk, q quit) 4. Dd & amp; rarr; delete VIM basic 1 of the current... Linux command. Basic operations: 1. switch normal mode and edit mode with ESC and I keys www.2cto.com 2. X → Delete a character of the current cursor. 3. : Wq → Save disk + exit (: w save disk,: q quit) 4. Dd → delete the current row and save the row to the clipboard. P/P → paste clipboard 6. Move the cursor in the direction key → 7. Yy → copy the current row to ddP 8. : Q! → Exit and do not save: qa! Forcibly exit all the files being edited, even if other files are changed. II. Advanced operations (the following command is in normal mode): insert mode: 1. A → insert 2 behind the cursor. O → insert a new row 3 after the current row. O → insert a new line 4 before the current row. Cw → Replace the character cursor that moves from the cursor position to the end of a word: www.2cto.com 1. 0 → zero number, to line header 2. ^ → To the first position in the line that is not a blank character (the so-called blank character is space, tab, line feed, carriage return, etc.) 3. $ → To the end of the row 4. G _ → to the last position of the line that is not a blank character. 5. /Pattern → search for the string of pattern. other operations: 1. : E → Open a file 2. : W → Save disk 3. : Saveas → Save 4. : X, ZZ or: wq → save and exit (: x indicates to save only when needed, ZZ does not need to enter a colon and press enter) 5. : Bn and: bp → you can open many files at the same time and use these two commands to switch to the next or previous file.

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.