Introduction to Vim

Source: Internet
Author: User

Introduction to Vim
    • Vim is an upgraded version of VI
    • Vim is a color-display
    • Installing Vim:yum install-y vim-enhanced
    • General mode, edit mode, command mode
Vim color display and move cursor
    • Vim editing files are displayed with color rendering, and the display of colors is displayed according to the specific content.
    • Move cursor

h or LEFT ARROW key-----------------------the cursor moves one character to the left

L or RIGHT ARROW key--------------------------the cursor moves one character to the right

K or UP ARROW-------------------------the cursor moves up one character

J or DOWN ARROW--------------------------the cursor moves down one character

Ctrl+f or PageUp key-----------------------screen to move forward one page

Ctrl+b or PageDown key--------------------screen to move backward one page

Number 0 or Shift+6--------------------------moved to the beginning of the bank

Shift+4------------------------------------move to the end of our line

GG-----------------------------------------move to the first line

G------------------------------------------move to Tail line

NG (n is any number)--------------------------moved to line N

Copy and paste in general mode

X and x---------------------------------------x means to remove one character backwards, and X to delete one character forward

NX-----------------------------------------Remove n characters backwards

DD-----------------------------------------Delete/cut the row where the cursor is located

NDD---------------------------------------Delete/cut n rows after the row where the cursor is located

YY----------------------------------------The copy cursor is in the row

P-----------------------------------------Paste what has been copied or pasted down from the line where the cursor is located

P-----------------------------------------Paste what has been copied or pasted up from the line where the cursor is located

Nyy---------------------------------------start from the line where the cursor is, and copy the n rows down

U-----------------------------------------restore previous action

V-----------------------------------------move the cursor after pressing V to select the specified character, then you can copy, paste and so on.

Introduction to Vim

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.