Some of the most common Vim editor shortcut keys:

Source: Internet
Author: User

Some of the most common Vim editor shortcut keys:

h","j","k","l", respectively, control the cursor left, bottom, up, and right one grid.

Press "ctrl"+"b": The screen moves one page to the back.

Press "ctrl"+"f": The screen moves one page to the front.

Press "ctrl"+"u": The screen moves the half page toward the back.

Press "ctrl"+"d": The screen moves the half page toward the front.

"0" by number: Moves to the beginning of the article.

Press "g": Move to the end of the article.

Press "$": Moves to the end of the line where the cursor is located.

Press "^": Moves to the beginning of the line where the cursor is located

Press "w": Cursor jumps to the beginning of the next word

Press "e": Cursor jumps to the end of the next word

Press "b": Cursor back to the beginning of the last word

Press #l: The cursor moves to the first # position of the line, such as: 5l,56l.

"x": Deletes the current character every time it is pressed.

#x: For example, "6x" represents the "after" 6 characters of the location where the cursor was deleted.

"x": Uppercase X, each time it is pressed, deletes the "front" character at the location of the cursor.

"#X": for example, "20x" represents the "front" 20 characters of the location where the cursor was deleted.

"dd": Delete the line where the cursor is located and fill it with the next line.

#dd: Deletes the # line starting at the line where the cursor is located.

"#G":"15g", which means moving the cursor to the beginning of line 15th of the article.

"w": Enter the letter "w" the colon to save the file.

"q": Press "q" is to exit, if you cannot leave VI, can be "q" followed by a "!" Force to leave Vim.

"wq": Generally recommended to leave, use with "w", so you can also save the file when exiting.

ZZ immediately saves the file and exits.

P Paste

U undo Once

Ctrl+r anti-Revocation once

Multi-window function: In the command line mode input: SP, so that two files can be displayed on a screen at the same time, and then press CTRL + W, and then release all the keys, and then press the DOWN ARROW key or UP ARROW key to select the window, if you want to close a window, directly: Q.

Some of the most common Vim editor 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.