Linux Basic Operation 7 VI operation details

Source: Internet
Author: User
Tags linux

1 VI Editor's cursor movement and paging operation

1 cursor Movement

H Move Cursor left

L MOVE the cursor to the right

J Move Cursor up

K Move Cursor Down

2 Paging operation

Ctrl+f the whole page forward.

Ctrl+b the whole page backwards.

Ctrl+u forward Half a page

Ctrl+d back half a page

2 Quick Jump in line

^ Move the cursor fast to the beginning character

$ move the cursor quickly to the end of the line

W quickly jumps the cursor to the first letter of the last word at the position of the current cursor

B quickly jumps to the first letter of the previous word at the current cursor position

E quickly jumps the cursor to the end of the second word at the current cursor position

3 file Quick jump between the experts

: Set n u display line number in editor

: Set N on u cancel display of line numbers in editor

1g/gg Quick jump to the first line

G Quick jump to the end of the file line

XG Quick jump To line X of a file

4 Some operations for input modes

I inserts a state at the current cursor

A inserts the state after the current cursor

A the cursor moves to the end of the current line and enters insert mode

o Inserts a new row below the current line, moves the cursor to the beginning of the new line, enters the insertion state

O inserts a new row above the current line, moves the cursor to the beginning of the new line, enters the insertion state

CW deletes the current cursor to the character at the end of the word and enters the insert state

C $ Deletes the current cursor to the end of the line and enters the insertion state

c^ deletes the character of the current cursor to the beginning of the line and enters the insert state

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.