Vi move the cursor and scroll screen (zz)

Source: Internet
Author: User

Http://hi.baidu.com/hexcode/blog/item/535b7925169402398644f95c.html

J lower
K
H left
L right
NJ n indicates the number, indicating the number of rows to be moved down. Others are similar

H move to the top of the screen, high
M moves to the center of the screen, middle
L move to the bottom of the screen, low
NH,... n indicates the number, indicating the number of rows that move to the top of the screen.

Gg move to File Header
G move to the end of the file
Ng moves to row N of the file
1G = gg
: Move the row number to the specified line (command line input)

Ctrl f move forward one screen, move down
Ctrl B, move back to the screen, move up

Ctrl d move forward half screen, move down
Ctrl u move back half screen, move up

CTRL e roll up a row
CTRL y roll down a row

Move the current line of Z enter to the top of the screen
ZT moves the row where the cursor is located to the top of the screen

Z. The current row is moved to the center of the screen.
ZZ place the cursor row in the middle of the screen

Z-Move the current row to the bottom of the screen
ZB moves the cursor row to the bottom of the screen

W moves to the beginning of the next word
W moves to the beginning of the next word (a space-separated word)

E move to the end of the next word
E. Move to the end of the next word (a space-separated word)

B is moved to the beginning of the previous word
B is moved to the beginning of the previous word (words separated by spaces)

$ End of line
0 line Header
^ Line header, the first non-null character

] Next section
[[Previous section

(Move to the beginning of the sentence! .? End)
) To the end of the sentence.

{Move to the beginning of the paragraph (the paragraph is separated by blank lines)
} Move to the end of the paragraph

FW, FW move to a specific character W
N % move the cursor to N % of the file, for example, 50% move to the center of the file
% Matching parentheses can be found),],}

+ Move to the first character in the next column
-Move to the first character in the previous column

TN moves down to the first occurrence of CHARACTER n
TN moves up to the next character after the first occurrence of CHARACTER n

====================
Move by search
====================
/Pattern: Forward search mode. pattern indicates the content to be searched.
? Pattern Backward Search Mode
N repeat the previous search
N reverse direction repeat the previous search

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.