Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The copy and paste command of vim and the use of registers to store the contents to be copied

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

One, y (yanks) copy, p (paste) paste

Yy copies the current line, 2yy, copies 2 lines

Y copy the whole line; Y=yy

P paste after the cursor

P paste in front of the cursor

Note that vim will know whether you are copying the content in a full line or a rectangular block, and pasting the content will be done accordingly.

Second, copy to register, amurz register

"A3Y copies 3 lines into a register, and the paste command is:" ap

"fyy copies the contents of the current line of the cursor to the f register, and pastes the command:" fp

Third, the contents of * can also be put in the register.

"wdaw copies the current word to register w, and the paste command is:" wp

Fourth, append content to the register

"aY copies the current line to register a

Move the cursor to the second line

"AY uses an uppercase A, which means what is appended to the a register

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report