Vim command notes

Source: Internet
Author: User

Vim commands are complex. The following are the commands I have taken today. Take notes!

Hjkl: Move to the bottom left and the right.

D: Delete

W: Word

$: End of a row

DD: delete a whole row.

P: Paste

V: select a row.

Example: deleting d10w or 10dw is a word! P can paste the deleted part at the cursor!

/: Search for characters such as/word. /Regular expressions are supported later

10g: move the cursor to the tenth line.

50%: Jump the cursor to the 50% position

: Set number: Add row numbers to each row

Hml: Table sharding indicates that the home middle last cursor will jump to the corresponding position

: Close closes the current text and does not exit Vim

: Quit closes the text and exits vim, but an error is reported when the price is not saved.

: Wa QA: Save all and exit all

S: replace % S/ABC/DEF to replace the full text ABC with Def

A file is generated for each row. The file name ranges from 1.txt to 2.txt...: G/^/EXE ". W". Line ("."). ". txt"

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.