Vim shortcut key category

Source: Internet
Author: User
I. Mobile:
H, J, K, L: Left, bottom, top, right.
W: the beginning of the next word.
E: the end of the next word.
B: the first word of the previous word.
<>: Indent the selected V mode.
Ii. Redirect:
%: You can jump between {}, "", (), and.
H, M, and l: Jump directly to the top, center, and bottom of the current screen.
# H: Jump to line # Of the current screen.
# L: the last line to jump to the current screen.
ZT: The current editing row is set to the top of the screen.
ZZ: The current editing row is set to screen.
ZB: The current editing row is set to the screen bottom.
G: Jump directly to the bottom of the file.
GG: Jump to the beginning of the file.
(): Jump to the beginning and end of the current row.
{}: Jump up and down to the nearest empty row.
[{: Jump to the beginning of the current block.
]}: Jump to the end of the current block.
0: Jump to the beginning of the line.
$: Jump to the end of the line.
2 $: jump to the end of the next row.
#: Jump to the # position of the row.
# G: 15 GB, jump to 15 rows.
: #: Jump to # Line.
F'n': jump to the next "N" letter.
CTRL + B: Flip the page backward.
CTRL + F: Flip the page forward.
CTRL + u: half page backward.
CTRL + D: the first half of the page.
Ctry + E: roll down a row.

3. Select:
1. V: select a row.
2. ^ V: select the rectangle.
3. v3w: select three characters.
4. Edit:
1. added:
I: Insert before the cursor.
I: insert it at the beginning of the current row.
A: insert the cursor.
A: insert at the end of the current row.
O: Insert a new row before the current row.
O: Insert a new row after the current row.
2. Modify C (Change) as the primary node:
R: Replace the character at which the cursor is located.
R: Replace the character wherever the cursor goes.
CW: change the word at the cursor to the ending point.
C # W: c3w 3 characters.
C: change to the end of the row.
Ci': Modify the text content in the paired punctuation marks.
Di': delete text content from the paired punctuation marks.
Yi': copy the text content in the paired punctuation.
VI ': select the text content in the paired punctuation.
S: Replace the character of the current cursor.
# S: delete # The row and replace it with the new text.
3. delete D (delete) as the primary node:
D: delete it to the end of the row.
X: Delete the first character of the cursor position every time you press it.
X: Delete the next character at the cursor position every time you press it.
# X: delete 6 characters after the cursor position.
D ^: Delete to the beginning of the row.
D $: Delete to the end of the row.
DD: (CUT) Delete the row where the cursor is located.
DW: Delete the remaining part of a word after a word/cursor.
D4w: delete four words.
# DD: delete a row from the row where the cursor is located.
Dab: delete {} and its contents.
DiB: Delete content in.
N1, N2 D: Delete content between N1 and N2 rows.
4. Search:
/: Enter a keyword. If the keyword is not found, press N and search backward until it is found.
? : Enter a keyword. If the keyword is not found, press n to search forward until it is found.
*: Search for the same word on the current page.
#: Search for the same word on the current page.
5. Copy y (Yank) as the primary node:
YW: copy the character at the end of the cursor to the buffer zone.
# YW: Copy # words to the buffer zone.
Y: equivalent to YY. Copy the entire row.
# YY: Indicates copying the number of lines down from the row where the cursor is located # Line Text.
P: paste. All Y-related operations must be pasted with P.
N1, N2 Co N3: copy the content between line N1 and line N2 to the end of line N3.
6. case-insensitive conversion:
Guu: Change the letter of the current row to uppercase.
Guu: Change the letter of the current row to lowercase.
Guw: change the words under the current cursor to uppercase.
Guw: change the words under the current cursor to lowercase.
A. uppercase:
Gggug
GG: cursor to the first character of the file.
Gu: lowercase letters are all selected.
G: The end of the file.
B. Lower case: gggug
7. Others:
J: merge the current row and the next row into one row.
8. Mobile:
N1, N2 M N3: Move the content from line N1 to line N2 to line N3.

5. Exit:
1. W filename: Save the file filename being edited
2. WQ filename: Save and exit the file filename being edited.
3. Q: exit and do not save.

6. window operations:
1. CTRL + w p: switch back and forth between two split windows.
2. CTRL + w j: Jump to the split window below
3. CTRL + w h: Jump to the split window on the left.
4. CTRL + w k: Jump to the split window above.
5. CTRL + w l: Jump to the split window on the right.

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.