Vim Usage Summary

Source: Internet
Author: User
Three modes of VIM

General mode (switch to command mode press shift+: key combination, switch to insert mode press I or a key)

Insert mode (switch to edit mode press ESC)

Command mode (in general mode after typing the appropriate command by pressing the ENTER key)

Function

Display line number under Command mode (":" appears below the screen), type set nu! (You can add set nu! to/ETC/VIM/VIMRC to make vim display line numbers by default). Set nu! The effect of the switch, when Vim is in the display line number state, you can use its hidden line number; When Vim is in the display line number state, you can use it to display the line number.

move the cursor to the specified line number in command mode, type the number of lines

move the cursor to the file header or tail in general mode, type GG or GG to

display the current file name in general mode, press the key combination Ctrl+g

Vim Usage Summary

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.