Linux Learning one-day command (+) [VIM command]

Source: Internet
Author: User

Vim

X: Delete the character of the cursor (same as delete)

De: Delete the ending of the word from the position of the cursor

DW: Delete the first word from the cursor position until the next word

DB: Delete the contents of the word before the cursor

DG: Delete the contents of the line at the end of the cursor

G: The cursor jumps to the specified position and enters the position before entering G

GG: End of line

GG: Beginning of the line

Ctrl+g: see where the cursor is, and how many lines of the file are displayed (display position as a percentage)

: s/old/new/g: Replaces the old line of the cursor with the new

:%s/old/new/g: Replace all old in the file with new

:%s/old/new/gc: Enter interactive mode, replace all old in the file with new (Y: OK, a: All OK, L: Only the first match is determined)

R: replace (one letter only, replace once)

R: replace (one letter, can be replaced multiple times)

U: Undo

Ctrl+r: Canceling the Undo command

There are other common ones that are not listed (e.g., dd,yy,p,i,o)

This article is from the "Linux Personal Summary" blog, please be sure to keep this source http://xuelinux.blog.51cto.com/9927651/1752780

Linux Learning one-day command (+) [VIM command]

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.