Vim Tips 3

Source: Internet
Author: User

YYP Copy the current line to the next line
DDP cuts the current line to the next line
CW: Deletes the current word and enters insert mode
XP: Swapping current and right characters
S: Delete the character of the cursor and enter insert mode
I: Enter text at the beginning of the line and enter insert mode
A: Enter text at the end of the line and enter insert mode
O: Enter text and enter into insert mode by opening a single line above the line on which the cursor is located
S: Delete the cursor line and enter insert mode

Normal mode use command
X: Delete one character of the current cursor
CW: Replaces characters from the position of the cursor to the end of a unit
^: to the first position of the bank that is not a blank character (blank refers to a space, line break, carriage return, etc.)
$: To the bank's tail
G_: To the last position of the bank that is not a blank character
P: Indicates after copy to current position
P: Indicates the copy before the current position
: E <path/to/file> Open a file
ZZ Direct Save Exit
Qa! forcibly quits all files that are being edited
To open multiple files, use these two commands to switch to the next or previous
: Bn
: BP
(n: Indicates switch to next file)

.: Repeats the last command
n<command> repeat a command n times
2DD: Delete two rows
2p: Paste Text 2 times
100IDESU[ESC] Write down 100 desu
Repeat the previous command.
3.: Repeat three times desu
To nth row: NG
W: To the beginning of the next word
E: To the end of the next word
*: Match the cursor in the current word, move the cursor to the next
#: Move cursor to Previous
Command linkage:
<start Position><command><end position>
Example:
0y$: Copying from the wardrobe to the end of the line
Ye: Copy from the current position to the last position of the word
Uppercase U: Toggle between the bank's uppercase or lowercase
FA: to the next character at a, FS to the next character in S
3FA: Find the third occurrence of a in the current row
F is the same as t:f and T, in the opposite direction; HHH

Insert mode:
Enter a word, press CTRL+P, CTRL + N auto complement function

Vim Tips 3

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.