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

Linux vim delete, copy, paste shortcut key sharing

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article introduces the knowledge of "Linux vim delete, copy, paste shortcut key sharing". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Delete

The lowercase x of x means to delete one character backward, that is, to delete the character where the cursor is located.

Nx n represents a number, which means to delete each character backward. For example, 10x means to delete the next 10 characters, including the cursor.

X uppercase X means to delete a character in front of the cursor, excluding the character in which the cursor is located

NX n represents a number, which means to delete each character forward. For example, 10X means to delete 10 characters before the cursor, excluding the character in which the cursor is located.

When dd deletes the line where the cursor is located, it is also a cut.

Ndd n represents a number and deletes the downward n line where the cursor is located

D1G deletes the row of the cursor to the first row of data

DG deletes the row of the cursor to the last row of data

D0 deletes the first character of the line where the cursor is located

D $removes the last character of the line where the cursor is located

Copy

Yy copies the line where the cursor is located

Nyy n represents a number and copies the downward n lines where the cursor is located

Y1G copies the data from the row of the cursor to the first row

YG copies the row of the cursor to the last row of data

Y0 copy the first character of the line where the cursor is located

Y$ copy the cursor to the last character of the line

Sticky

P small p pastes the copied data on the next line of the cursor

P Big P pastes the copied data on the previous line of the cursor

J merges the row of the cursor with the data of the next row into a row

U Xiao u means to undo the previous operation (especially important, similar to crtl+y in word in windows)

Ctrl+r, in contrast to u, means to redo the previous step (especially important, similar to crtl+y in word in windows)

. Point, which means to repeat the previous operation, for example, if you want to copy it many times, just press this point all the time.

Note: the above deletion, copy and paste are all operations in non-editing mode.

This is the end of the content of "Linux vim delete, copy, paste shortcut key sharing". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Servers

Wechat

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

12
Report