Vim common commands (go)-dictation version

Source: Internet
Author: User

1. Cursor movement

On

Under

Left: "Lowercase letter"

Right:

The beginning of the previous line: "Minus"

The beginning of the next line:

Beginning of line: "Number 0"

End of Line:

The ending of a word or the last word:

The first word of the word:

The first or first word of a word:

Jump to a specific line:: Line number (: 5: Jump to line 5th)

Previous screen:

Next screen:

Upper Half Screen:

Lower half Screen:

To roll up the screen:

Scrolling down:

Skip to File header:

Skip to end of file:

2. Search

Backward Mode search:

Forward mode search:

Note: Combine n and N to find forward backwards

3. Append or Insert

Append to right of cursor:

Append the end of the cursor line:

Append to left of cursor:

Append the beginning of the cursor: "I uppercase"

Insert line below cursor: "Letter O"

Insert line above cursor: "Uppercase of Letter O"

N to M line header Insert #: "1 to 5 lines, beginning of insertion wow:1,3 s/^/wow/g"

N to M+l line header Insert #: "1 to 6 lines, beginning of insertion #: 1,+5 s/^/#/g"

4. Delete

Delete cursor:

Delete cursor to the left:

Delete the word that contains the cursor:

Delete the current line:

Delete cursor to end of line:

Delete the current row and the following n-1 line: "N is a number, is the number of rows to be deleted"

Delete N to M line:: "Delete 1 to 3 rows: 1,3 D" When M is used with $, indicating to the end of the document

5. Copy and paste

Copy the word where the cursor is located:

Copy cursor to end of line:

Copy the current line:

Copy Rows N times:

Copy the current row and the following n-1 line: "N is a number, is the number of rows to copy"

Copy N to M lines, paste to K+1 line:: "Copy 1 to 3 lines, paste to line 5th: 1,3 Co 4"

Cut N to M lines, paste to K+1 line:: "Cut 1 to 3 lines, paste to line 5th: 1,3 M 4"

Paste to the cursor:

Paste to the cursor:

6. Withdrawal of reply

Revoke:

Recovery:

7. Replace
Replace the character where the cursor is located:
replace one word:
Replace the previous character where the cursor is located:
Replace all characters in the cursor to the end of the line:
Replace the current line:
Replace the first old of the current line with new: Replace all old for the current line with new: Replace the current line to the last row of the
first old to new:
Replace all ol of the current line to the last row D is new:
replace the first old of line
N to row M with new:
Replace all old with the nth
row to the M row
as new: Replace All rows with the first old with new: Replace all old
for all rows with new :

8. Other

To view the current settings:

Show line number:

Hide line number:

Do not save exit:

Do not save forced exits:

Save edits:

Save and exit:

To connect two lines together:

Concatenate n rows together: The line of the cursor and the next n-1 line

Execute shell command: For example: View current time:

Read the results of the shell execution and place the result behind the cursor: For example: List files in directory:: R!ls

Simple Encrypted File:

Vim +n filename Opens the file filename and places the cursor at the beginning of the nth line

Vim + filename Opens the file filename and places the cursor at the beginning of the last line

Vim +/pattern filename Opens the file and places the cursor in the first serial that matches the pattern

Vim-r filename recovers filename at the last vim crash

Vim common commands (go)-dictation version

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.