Vim shortcut keys

Source: Internet
Author: User

Normal Mode

J Skip to Next line

k jump to the previous line

h move forward a character

L Go backward one character

a Enter edit mode and insert content after the cursor

A Enter edit mode and insert content at the end of the line

b Navigate to the first letter of the word

BDW first position to the first letter, then delete to the end of the letter, the effect of the same as the Daw

cc Delete a row and enter insert mode

C Enter edit mode and delete content from the cursor position to the end of the line

CW Delete the cursor position to the end of the word and enter insert mode

D removes the character from the cursor position to the end of the word and does not enter insert mode

DD Delete a row

DW Delete the character with the cursor to the end of the word, including spaces

de Delete the cursor to the end of the word, with no spaces

D0 Delete from the cursor position, without the cursor position, to the beginning of the line

d2w Delete Two words after the cursor

Daw Delete a word

s Delete the character under the cursor and go to edit mode

S delete the cursor line and position the cursor at the beginning of the row and enter edit mode

I Navigate to the beginning of the line and enter edit mode

$ cursor positioned to end of line

f+ characters or t+ characters finds the next specified character in a row, then passes through; and, jumps back and forth

f+ characters or t+ characters find the previous specified character in a row

Esc key +o A new row and position the cursor to the beginning of the line

Yyp Copy a row

ye copy from cursor to end of a list/word, excluding spaces

yw Copy from the cursor to the end of a list/word, including spaces

y0 The beginning of the copy from the current cursor position (excluding the cursor position)

y5g Copy the current line (including the current row) to line 5th (excluding it)

y3l Copy 3 characters to the right from the cursor position (including the cursor position)

Insert Mode

ctrl+h Delete the previous character (same effect as BACKSPACE)

Ctrl +w Delete a previous word

Ctrl+u Delete beginning of line

R{char} and Gr{char} allows us to override a single character and return to normal mode

/+ Words you can find all the words in the edited file, and switch up and down by N and Shift+n .

v Mode

shift+< Left Indent

shift+> Right Indent

Replacement Mode

  Shift+r into replacement mode

command Line

ctrl+w Delete the contents before the cursor

PS

-a or-e all the processes are displayed.

-A displays all processes under the current terminal, including the processes of other users

- u user-oriented process state

x typically used with the A parameter to list more complete information

- F to make a more complete output

Vim 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.