VI and VIM

Source: Internet
Author: User

Three modes of 1:VI

General instruction Mode: VI opens (creates) a file by default in general instruction mode, you can move the cursor up or down, use shortcut keys to copy and paste, delete entire row of columns.

Edit mode: In the general instruction mode, press "I, I,a, A,r, R,o, o" Any one, enter the editing mode, the bottom left corner appears insert or replace Word. Keyboard input is now available. Press ESC to exit edit mode back to General instruction mode.

Command-line mode: General instruction mode, enter ":/?" Any time, enter command-line mode, and the cursor moves to the bottom row of the window. At this point, you can enter a number of commands, data search, read data, save, leave VI and other operations.

2: Shortcut keys in general instruction mode

3: Key description When entering edit mode

4: command-line mode instruction description

5: Interrupt Recovery

If the file is not saved during the editing process due to a machine shutdown, you will be alerted when the file is reopened. Swap scratch Disk file, you can perform the following operations for data recovery or discard:

Block selection for 6:vim

Enter block selection mode when the visual typeface appears in the lower left corner by pressing the V and V keys.

Move the cursor for content selection.

Then use Y to copy, d to delete, p to paste.

7:vim Multi-Window mode

8: Complementary hints

(the most commonly used 1, 3 key combinations, 1 is in-Document completion hints, 3 is based on the document type complement hints, especially with vim for development when the completion of the keyword is particularly useful.) )

9:vim Editing environment settings

VI and VIM

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.