Linux-vim Editor

Source: Internet
Author: User

Vim Full-screen plain text editorVim Use1 Vim file namelast-line modecommand----> input a append i insert O open (line break)command----> Last line: w Save: q! do not save exit: Wq Save and exit: N moves to the first line (n refers to a number): Set Nu sets line number: Set Nonu de-set line number                              2 Command mode operation 1) Cursor MovementH J k L (on one line) GG Move to the beginning of the fileG move to end of file   2) Delete entire row clippingDD Delete a single lineNDD Delete multiple linesp paste Past (delete how many lines to paste)x Delete a characterDG is removed from the line where the cursor is located to the end of the file 3) CopyyyNyy 4) Revocationu undoctrl+r anti-revocation 5) Display line number: Set Nu: Set Nonu  Vim configuration file~/.VIMRC manually created, vim configuration file 6) Find/Find what to look down (enter first)           N NextN Previous 7) Replace: 1,10s/old/new/g replaces all old with 1 to 10 rows as new:%s/old/new/g replaces entire file with old as new:%s/you want to replace who/what/g%s/backup/aaa/g: Add # to the beginning of 21,23s/^/#/g: Add # to the end of 21,23s/$/#/g A = ten#a =10:%s///g

Linux-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.