That's how Linux should learn--command set (VIM editor)

Source: Internet
Author: User

Shortcut keys commonly used in the command mode of the 1.vim editor:

DD Delete (cut) the entire line where the cursor is located

5DD Delete (cut) 5 lines starting at the cursor

yy copies the entire line of the cursor

5yy copy 5 lines starting at the cursor

P Pastes previously deleted (DD) or copied (yy) data into the cursor

/String to search for the string in text from top to bottom

String to search for the string in text from bottom to top

n Displays the next string that the search command navigates to

N Displays the previous string to which the search command is anchored

U undo the last step operation

Common commands in the last-line mode of the 2.vim editor:

: W Save

: Q exit

: q! Force quit (Discard modifications to the text)

: wq! Force Save exit

: Set NU Displays line number

: Set Nonu does not display line numbers

: command to execute the command

: integer jumps to the row

Appendix:

1. In command mode and last-line mode, all shortcut key parameters are case-sensitive.

2. There is a colon ":" Before all the shortcut keys in the last-line mode.

That's how Linux should learn--command set (VIM editor)

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.