Vim shortcut keys and tips

Source: Internet
Author: User

[[email protected] biji]# vim + 1.txt Open the file, the cursor is positioned to the last line
[[email protected] biji]# vim +5 1.txt Open file, cursor to line 5th
[[email protected] biji]# vim +/nobody 1.txt Open the file, the cursor is positioned to the first occurrence nobody position by the letter N switch nobody position
[[email protected] biji]# vim AA bb cc simultaneously create AA bb cc Press: n switch to BB file and press N to switch to cc file: N switch back with: Prev

common low-line commands
: w Save memory
: Q Exit
:! Forcing
: LS lists all open files
: N Toggles the next open file
: N switches to previous file
: 15 Switch to 15 rows
/xxx search XXX appears position cursor positioning to there
? XXX forward search, cursor positioning to there
h cursor Shift left
J Cursor Move Down
k move Cursor up
L MOVE the cursor right
ctrl+f PAGE DOWN
ctrl+b PAGE Up
ctrl+d down half page
ctrl+u up half a page
DD Delete the line where the cursor is located
o insert a row down the line where the cursor is located
yy copy cursor line
p paste below the line where the cursor is located
P paste above the line where the cursor is located

Vim shortcut keys and tips

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.