Tools-vim Common shortcut keys

Source: Internet
Author: User

using the VS code plugin Amvim to quickly edit the code, memorize the following command
Command key for switch to insert mode from normal mode

I

Enter body on the left of the cursor

I

Enter body at the beginning of the line where the cursor is located

A

Enter text to the right of the cursor

A

Enter body at the end of the line where the cursor is located

O

Adds a new line to the next line in the row where the cursor is located, at the beginning of the new line

O

Adds a new line to the previous line on the row where the cursor is located, at the beginning of the new line


modifier keys

X

Deletes the specified character at the cursor position

Dd

Delete the line where the cursor is located

U

Undo Recent Changes

U

Undo all changes made to the current line

R

Replaces one character at the cursor position

R

Replaces the character starting at the cursor position, changing the vi to text input mode

. (dot)

Repeat the last modification



Move key in normal mode

h or []

Move the cursor one cell to the left

J or []

Move the cursor down one cell

K or []

Move the cursor up one cell

L or []

Move the cursor one cell to the right

$

Moves the cursor to the end of the current line

W

Move the cursor one word to the right

B

Move the cursor one word to the left

E

Move the cursor to the end of the word

0 (0)

Moves the cursor to the beginning of the current line


Edit command

Key

Function

D

Deletes the text at the specified location, coexisting in a temporary buffer. You can use the put operator (p or P key) to access this buffer

Y

Copies the text of the specified position to a temporary buffer. This buffer can be accessed using the put operator

P

Places the contents of the specified buffer above the position of the current cursor

P

Places the contents of the specified buffer below the current cursor position


From normal into viewmode,2 mode using V Enter is selected by character using V in is selected according to the row, with Y copy with P paste mate D Delete


Enter visual mode from normal hold V or V

Enter command mode from normal to press A,i,o

Enter command mode from visual mode by pressing O







From for notes (Wiz)

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