Vim multi-line cut, copy, and delete

Source: Internet
Author: User
How to cut shortcut keys:
dd:剪切光标所处当前行n + dd:剪切光标所在行及以下共 n 行按 p 粘贴在光标所在行
Command line mode:
例如剪切1到10行,并粘贴在12行处:1,10 m 12
How to copy shortcut keys:
yy:复制光标所处当前行n + yy:复制光标所在行及以下共 n 行按 p 粘贴在光标所在行
Command line mode:
例如复制1到10行,并粘贴在12行处:1,10 co 12
To delete a shortcut key:
dd:删除光标所处当前行n + dd:删除光标所在行及以下共 n 行
Command line mode:
例如删除1到10行:1,10 d
Go to command line
"shift + :" :进入命令行模式"set nu" :显示行号"etc + etc" :退出命令行模式

In fact, press p paste when the situation is pasted in the next line of the cursor, you can know under their own actions.

Vim multi-line cut, copy, and delete

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.