My-vim-wiki-doing

Source: Internet
Author: User

Record several operations commonly used in VIM

Getting Started Guide
~ vimtutor~
1. Vim is case-sensitive 2. VIM Move Cursor

H Move Left

J Move Down

K Move Up

L Move Right

In fact, the use of the arrow keys can also be moved, but familiar with some other editor or browser can also be used

3. Delete in Vim

x Delete the letter where the cursor is located

DW Delete Complete Word does not include trailing punctuation

DD Delete entire row

D Delete entire row

2017-4-25

4. Vim Moves the line

: M 12 If the current line number is line 10th, move the current row to line 12th

Moves the current row to line 13th if the current line number is line 20th

: M 0 moves the current line to the front of the first row

: M $ moves the current line after the last row

: The space behind M can be omitted without writing

5. Vim moves multiple lines

: m5,7m 21 Move line 5,6,7 to line 21st

: m5,7m 0 Move the 5,6,7 line to the front of the first line

: m5,7m $ moves the 5,6,7 line after the last line

:.,. +4m 21 moves the 5 rows from the current line to the 21-row position

: +4m21, like the previous command, can be omitted. and spaces

6. Undo last action in vim

U undo

2017-04-26

7. Vim jumps to the last line or the first line

G jumps to the last line

GG jumps to the first line

2017-04-298. Vim jumps to the specified line

: 6 + Enter jump to line 6th

6G Jump To line 6th

6gg Jump To line 6th

Cond...

My-vim-wiki-doing

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.