Super-useful VIM command

Source: Internet
Author: User

Now, you don't have to worry about these complicated processes, because we can make use of Vim's shortcut keys to enable us to operate vim as smoothly as possible. Now, let me introduce a few very useful (we know that Vim shortcuts have a lot, not all of us have to remember, a few key enough to use.) )

First, positioning line

    • ' GG ': Jump to the beginning of the first line of the file
    • ' G ': Jump to the beginning of the last line of the file
    • ': 2 ': Jump to the beginning of the 2nd line of the file

Ii. start and end of the positioning line

    • ' $ ': navigates to the end of a line
    • ' ^ ': Navigate to the beginning of a line

Third, search

    • '/better ': Search ' better ' string
    • ' N ': Search for the next
    • ' N ': Search Previous
    • ' Set ignorecase ': ignoring case-insensitive searches
    • ' Set Noignorecase ': Search without ignoring the case

Iv. deletion (delete)

    • ' DD ': delete a row
    • ' DW ': delete one character
    • ' D ': Delete to the end of a line

V. Replacement (replace)

    • ' R ': replace the character
    • ' R ': Enter replacement mode

Six, add a row

    • ' O ': Add a row below the current line
    • ' O ': Add a row above the current line

Seven, Word

    • ' W ': One word, one word, jump backwards.
    • ' E ': Jumps to the end of the word
    • ' 2e ': Jumps to the end of the next word

Eight, comparative common and Practical command

    • ' I ': Switch to edit mode
    • ' x ': delete the character
    • ': Help W ': View the use of the ' W ' command
    • ' U ': Undo Previous action

Also, attach a very useful online tool for practicing VIM commands:http://vimgenius.com/

Come on, hope to help you, have any suggestions please leave a message, thank you!

Super-useful VIM command

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.