Basic use of the VIM editor

Source: Internet
Author: User
Tags switches

vim mode of OperationCommand modeInsert Mode inputEnd Line Mode VIM ABC if the file exists open, if it does not exist then createvim is in command mode by default when it startsThe command mode starts at the start of the cursor position, press A to start typing at the next character of the cursor, which is equivalent to moving right oneInput mode Press ESC key back to command modeCommand mode press shift+: Start bottom row mode, enter Wq save to exit in fact, it can be divided into command mode and input mode. Command mode: DD Press 2 times d key to delete cursor Current lineThe default cursor is on line 1th or last edited when the file is opened by default VIM + ABC when you open a file, the cursor is in the last lineVIM +3 ABC when you open a file, the cursor is in line 3rdVIM +1000 ABC if the file has only 100 rows, it is also positioned to the last rowVIM +/string ABC when you open a file, navigate to the line where the string first appears, and then switch between the keywords that are searched by the letter N.VIM ABC abcd ABCDE open 3 files: n switch to next file: N or: prev Switch to previous file : W Save: Q exit: Wq Save and exit: q! do not save forced exit: LS Lists all files that are currently open: N switches to the last file: N or: Prev switches to the previous file: 3 quick position to the third row/string search down from the current line, search for the first location? String search up from the current line to the next by N: Noh remove the persistent highlight after searchh Cursor left, J cursor down, K cursor up, l cursor right, ctrl+f PAGE down, ctrl+b up, ctrl+d down half page, ctrl+u up half pageDD Delete the line where the cursor is locatedo insert a row at the cursor line and switch to input modeyy copy cursor linep Paste on the next line of the row where the cursor is locatedP paste on the top line of the row where the cursor is located

Basic use of the VIM editor

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.