Vim General mode

Source: Internet
Author: User
Introduction to Vim
  • Yum install-y vim-enhanced installation package
  • Vim is an upgraded version of VI
  • Vim is color-displayed
  • Sub-general mode, edit mode, command mode
Vim color display and move cursor in general mode
  • The same file appears differently in different directories, and the display color is also related to the file name (suffix) and content
  • H moves to the left, L moves to the right, K moves upward, J moves down, space moves to the right, supports numbers and letters move multiple characters
  • Ctrl+f or PageUp screen moves forward one screen, ctrl+b or pagedown screen moves backwards one screen
  • The number 0 or shift+6 moves to the beginning of the line, Shift+4 moves to the end of the bank, GG moves to the first line, G moves to the tail line, and NG (n is any number) moves to the nth row
Copy and paste in general mode
  • X means to remove one character backwards and X to delete one character forward
  • NX removes n characters backwards
  • DD Delete/Cut the line where the cursor is located
  • NDD (n is number abbreviation) Delete/cut n rows after the line where the cursor is located
  • YY the copy cursor is in the row
  • P paste the copied or pasted content from the line where the cursor is located
  • P from the line where the cursor is located, paste the contents that have been copied or pasted up
  • Nyy starts at the line where the cursor is located, copying the n rows down
  • U Restore previous action
  • V Press V to move the cursor will select the specified character, and then can be copied and pasted and other operations

Vim General 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.