乐闻世界logo
搜索文章和话题

How to use Vim's register mechanism?

2月21日 15:12

Vim's register mechanism is one of its powerful features for storing and reusing text. Common registers include: unnamed register "" stores the most recently deleted or copied text; numbered registers 0-9, where 0 stores the most recently copied content and 1-9 store the most recently deleted content; named registers a-z, which users can manually specify; delete register - stores deleted characters; clipboard registers + and *, which interact with the system clipboard; read-only registers :, ., %, #, etc., which store the most recent command, most recently inserted text, current filename, and alternate filename respectively. Usage: "ayw to copy to register a, "ap to paste content from register a, :reg to view all register contents. The register mechanism makes complex text operations simple and efficient.

标签:Vim