Vim Common shortcut keys

Source: Internet
Author: User

Command Description Memory methods
1. Move the cursor
B Move backward to the beginning of the current/previous word
W Move forward to the beginning of the next word
E Move forward to the end of the current/next word End
Ge Move backward to the end of the previous word
W Move forward to the beginning of the next string
B Move backward to the beginning of the current/previous string
GE Move backward to the end of the previous string
2. Single-line Lookup
F{char} Find the Char,char of the current row can only be a single letter
; Find Backward
, Search forward
3. Move the cursor between text
10k/10j Up/down 10 lines
Ctrl+f Page Down Before
Ctrl+b Page UP After
[] Jump to the first line
Gg Jump to the first line
][ Skip to last line
G Skip to last line
: {num} Skip to Num Line
H Jumps to the first line of the current screen H=high
M Jumps to the middle row of the current screen M=middle
L Jumps to the last line of the current screen L=lower
Ma Sets a bookmark named A at the current cursor position (book signature range [A-z]) M=mark
' A Jump to bookmark a
{ Skip to previous paragraph
} Skip to next paragraph
4. Delete
di{symbol} Delete everything inside the symbol, such as di ', delete ' all content inside Delete in
da{symbol} Same as above, but with symbols also deleted Delete all
dt{symbol} Delete from the current cursor position to the symbol Delete to
Daw Delete the word where the cursor is located Delete all Word
Dw Delete the cursor at the end of the word
The d command above can be replaced with the C command, such as CAW, and then go directly into insert mode.
,<c-w> Delete a word in insert mode,<c-u> deletes a row from the beginning of the cursor.
5. Indent
5>> The following 5 lines indent to the right > Delegate right,< to left
The tab defined by indentation needs to be pre-set: Set sts=4 sw=4 et
6. Visual mode (equivalent to mouse selected state)
V Enter visual mode (character mode)
V Enter visual mode (full line mode)
CTRL + V Enter visual mode (block mode)
Comment A section of code:<c-v>} I # <ESC> <ESC>

Vim Common shortcut keys

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.