The VI editor for Linux

Source: Internet
Author: User

First, Mode conversion

I: Before the character of the current cursor, replace with input mode

A:................ After.........

O:............ Line below. Create a new row,

I: ... Header

A:................. End of Line

O:................. Above, create a new row

ZZ: Edit mode forced exit

Second, the cursor movement

1. Move by character:

H: Left

L: Right

J: Next

K: Up

#h: Moving a # character

2. Move in Word units

W: Move to the beginning of the next word

E: Jumps to the ending of the current or next word

B: Jump to the beginning of the current or next word

3, in-line jump

0: The absolute beginning

$: absolute end of line


4. Jump between rows

#G: Jump To Line #

G: Last line


Direct to travel number in the last line mode

Four, turn the screen

Ctrl+f: Turn up one screen

Ctra+b under


V. Delete command D

d$: Delete the current character to the end of the line

D0: First

#dw, #de, #db

DD, delete when moving forward

1,8d Tail Row Mode Delete 1-8 rows

., +5d Delete the current line to 5 rows down altogether delete 6 rows

Six, copy and paste

Y: Copy, use with D

P: Paste

If the entire row is copied or deleted, paste it to the bottom line, not the entire line, and paste it behind the cursor

Seven revisions

C: First delete the content, in the conversion to the input mode, the use of the same d

Eight replacement R,r

Nine undo

U (undo)

#u: Undo the last # Count action

Crtl+r: Restore Last Undo

Ten repeat before operation

.

11 Visualization Mode

V: Select by character

V: by Mega selection

The VI editor for Linux

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.