Vim Edit and Command mode

Source: Internet
Author: User
Vim edit mode
  • I enter edit mode from where the cursor is located
  • I enter edit mode from the beginning of the cursor position
  • O Enter edit mode from below the line where the cursor is located
  • O Enter edit mode from the line where the cursor is located
  • A from the location of the cursor to the next one into edit mode
  • A enters edit mode at the end of the line where the cursor is located
Vim Command mode
  • /word after the cursor looks for a string word, press N to go back to search
  • ? Word finds a string before the cursor word, press N to continue searching
  • : n1,n2s/word1/word2/g find word between n1-n2 rows and replace with Word2, without G replaces only the first word1 of each row
  • : 1, $s/word1/word2/g replace all word1 in the document with Word2, and no G replaces only the first word1 of each row
  • : W Save Text
  • : Q Quit Vim
  • : w! force save, under root user, even if the text is read-only can be completed save
  • : q! forced exit, all changes not in effect
  • : Wq Save and exit, change Mtime
  • : Set NU Displays line number
  • : Set Nonu does not display line numbers
  • : Nohl Suppress highlighting
  • : x Save exits if no changes are made to the file Mtime
Extended
  • Special usage of VIM
  • Vim Common shortcut key summary
  • Vim quickly deletes a segment of characters
  • Vim garbled
  • Keypad issues
  • VIM encryption

Vim Edit and Command mode

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.