Use Vim, vim

Source: Internet
Author: User
Tags exit in

Use Vim, vim
Mode

  • ESC \ Ctrl + c: Exit edit mode
  • ZZ \ wq: Save and exit in command mode
Edit
  • I: Enter the editing mode.
  • I: Go to the beginning of the line to start editing
  • S: deletes the current character and enters the editing mode.
  • A: edit the current character
  • A: edit A non-null character from the end of the current row.
Mobile
  • H j k l: bottom left, top right
  • 0: zero number, to the line Header
  • ^: The first place in the line that is not a blank character (the so-called blank character is a space, tab, line feed, carriage return, etc)
  • $: End of the row
  • G _: the last position of the line that is not a blank character.
  • W \ W: Line jump to the beginning of the next word \ quick jump
  • B \ B: Line-word jump back \ fast jump back
  • E: Move to the end of the next word
  • Ge: Move to the end of the last word
  • Td \ Td: Jump to the previous character of the next d \ The next character of the previous d
  • Ntd \ nTd: Jump to the previous character \ next character of n d
  • Fa \ Fa: jump to the next a \ and return to the previous a. nfa \ nFa is similar to the previous one.
  • *: Jump to other identical words
Copy, paste, and delete
  • Ndd: delete n rows
  • Nyy: Copy n rows
  • Yap: copy a piece of content
  • Gp: paste a piece of content
  • GP: paste content in the previous line
  • P: paste it to the next row.
  • P: paste it to the previous line.
Register
  • ": The default anonymous register
  • Dd: by default, the content is cut to the unknown register.
  • "_: Black Hole register, discard the stored content
  • "_ Dd: Delete
  • "+ P: paste the system clipboard content," +, system clipboard register
  • "0 p: paste the copy register content
Combined Command Delete copy Modification
  • Dw | yw | cw: delete by word \ Copy \ modify
  • Dfd | yfd | cfd: Delete to \ Copy \ modify next d, including d
  • Dtd | ytd | ctd: Delete to \ Copy \ modify the character before the next d
  • Di "| yi" | ci ": Delete content between \ Copy \ modify"
  • Da "| ya" | ca ": delete \ Copy \ modify content between quotation marks and quotation marks

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.