Vim-easy to forget but commonly used operations (one)

Source: Internet
Author: User
(1) easy to forget but commonly used operations:
(1) mobile
W/W: Move to the beginning of a word, case-insensitive punctuation
E/E: Move to the end of a word. The case difference is the same as above.
B/B: Move to the beginning
H/m/L: Move to screen top/screen end
: N moves to the beginning of N rows, or NG

(: Move to the next sentence
): Move to the previous sentence.
}: Move to the next paragraph
{: Move to the previous paragraph

(2) Matching
%: Match {}/[]/()

(3) Operation
J: connect the next row to the row.

(4) Delete
D0/d ^: Delete to the beginning of the row
D $: Delete to the end of a row

(5) Replacement and Restoration
CC/S: replaces the entire line of content.
CW: replace an English text
C/C $: Replace with the end of the row
C0/C ^: Replace with the first line
R/S: replace mode/R as overwrite mode, and s as plug-in Mode

(6) add the following words:
5j: Merge five rows into one row
5I A: Press ESC and insert 5.
2I SYS: insert syssyssys.

(7) format text:
GG = G: Full Text indent
: Ce (NTER): Text center
: RI (ght ): this line of text is right-aligned.
: le (FT): This line of text is left-aligned.
gqap: full-range shuffling
gqq: This line of text
gqg: full text re-arrangement
If the part is marked by visual mode, only the part marked by GQ will be re-arranged.

(8) Copy (Yank)
y2y: Copy 2 rows
y2w: Copy 2 words
y1g: copy to the beginning
YG: copy to the end of the file
y ^/y0: copy to the beginning of the line
Y $: copy to the end of the line
"Ayy: copy this line of text to the buffer
"AP: paste the buffer text to the current text
: Reg: list Code and content
"+ YY: copy the row to the global buffer.: In the reg command, "+
indicates the global buffer. After being copied to the global buffer, you can use other software to copy or paste the data.
"+ P: paste the global buffer to the current text.
"* YY: After the text is selected in VIM (reversed), the file will be copied to" * buffer

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.