Vim tool (bottom)

Source: Internet
Author: User

5.5vim entering edit mode

5.6vim Command mode

5.7vim Practice


5.5vim entering edit mode

Everything entered in edit mode is entered in front of the cursor.

press the "I" cursor to enter the editing mode at the current position.

Press the "I (shift+i)" cursor to enter the edit mode at the beginning of the bank.

Press the "O" cursor on the next line of the bank, and another line enters edit mode.

Press the "O (shift+o)" cursor on the line of the row, and another line enters edit mode.

Press the "a" cursor to move backward one into edit mode.

Press the "A (shift+a)" cursor to move to the last face of the bank to enter edit mode.

5.6vim Command mode

"/work" into general mode search he will highlight what you want to search for, "shift+n" to look forward.

": Nohl" does not highlight

": 1,100s/192.168.137/119.119.1/g" begins with ":", 1 for the first line, 100 ($ for the last line) for the 100th row, s for the replacement, 192.168.137 this is the content to replace, 119.119.1 This is the new content to replace, G represents the global substitution. (If you don't add g then if you have two items to replace in your line he will only replace the previous one, and the one behind will not be replaced)

":" Up and down keys to find the commands you used before

"1, $s//bin:/sbin/nologin/gyblinux/g" If we replace the content with the "/" number, we can use the following method "1, $s/\/bin:\/sbin\/nologin/gyblinux /g "or" 1, $s#/bin:/sbin/nologin#gyblinux#G "," 1, $s@/bin:/sbin/nologin@ gyblinux@g "


Small knowledge:

": Wq" and ": X". But a situation is not the same, that is, you vim a document you did not change the content, and then ": Wq" then the document Mtime will change, and ": X" will not.



5.7vim Practice

We learned the operation of Vim to practice, we memorize is too long to remember that only we use skilled will not forget the following we do the following requirements to do experiments

If you don't know what to do, you can look at the following answers:










    1. Special usage of VIM

    2. Vim Common shortcut key summary

    3. Vim quickly deletes a segment of characters

    4. Vim garbled

    5. Keypad issues

    6. VIM encryption


Amin Linux


Vim tool (bottom)

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.