5.1 Vim-5.4vim Editor

Source: Internet
Author: User

5.1 Vim Introduction

1. vim is an upgraded version of VI

2. Vim is a color display

3. Yum install vim command:

[< /span>[email protected] ~]# Yum install-y vim-enhanced

4 . three modes : General mode edit mode Command mode

Enter edit mode: I key or a key

5.2 Vim color display and move cursor

Display color, depending on the file name type content syntax, etc.

General mode: Shortcut keys!

light The label moves to first line gg  

cursor moves to End of Line : Shift key + g


cursor left Move: h

cursor Right Move: L

cursor Right Move: Space Bar (Specify the mobile number + SPACEBAR to move the specified number of bytes)

cursor Upward Move: k

cursor downward Move: J

5.3 Vim General mode move cursor

1. VIM display color conditions are many: file name, file content, file directory and other factors, the display of the color is not nearly the same.

2. Move the cursor in general mode

Specify Digital + Specify Key = Move to the specified location

Digital One + keyboard h = The current cursor is located, move 11 characters to the left

5.4 Copy cut paste in general mode

1. Cut cursor line DD

scissors Cut 5 lines ( cursor line and bottom 4 line 5 + DD

2. Copy cursor line yy

copy 5 rows ( Cursor Line and the Next 4 lines ): 5 + yy


3. Paste to Cursor downlink Span style= "font-family: Microsoft Jacob Black, Microsoft Yahei; font-size:22px; Color:rgb (223, 64, 42); " > P

4. Paste to Cursor Upstream : Shift + P (uppercase P)


5. Delete cursor pre-character -- shift + X ( capital X)

  Delete First 5 characters -- 5 + Shift + x

6. Delete cursor post character -- x

Delete after 5 characters -- 5 + x


7. restore Previous action: u

8. Reverse Restore Previous action :Ctrl + r


9 . tag selected characters: v + move key

Mark selected Character clipping: v + Move Key + x

Paste: P

5.1 Vim-5.4vim Editor

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.