Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the registers commonly used in Vim

Shulou Source: shulou.com Published: 2022-06-01 00:58:30 09月24日 Update

This article mainly introduces the relevant knowledge of "what are the registers commonly used in Vim". The editor shows you the operation process through an actual case. The method of operation is simple and fast, and it is practical. I hope this article "which registers are commonly used in Vim" can help you solve the problem.

Registers are temporary spaces that Vim uses to store text, similar to caching. When you use operations such as the command y copy or the d command to delete text, the text is temporarily saved in the register. Registers are the core of Vim copy and paste and copy and paste between system clipboards, so to fully understand Vim copy and paste, you must first understand Vim registers. Vim registers are divided into nine categories, but fortunately, there are only three commonly used registers:

Nameless register

"" to cache the contents of the last operation (copy y or delete d)

Digital register

"0x9, a total of ten digital registers, caches the contents of the last 10 operations, but it is important to note that" the 0 register caches the contents of the last copy operation, while the nine registers of "1x9" cache the contents of the last nine delete operations.

System clipboard register

"* and" +, these two registers are the clipboard of our system, and the contents of the cache can be text copied into other programs, which is a big difference from other registers, because other registers can only be copied and pasted within Vim applications, and these two registers can be copied and pasted across programs, so that You can easily copy content from other places (such as web pages) to the Vim editor.

The reg command can see what is currently cached in the registers above in Vim.

This is the end of the introduction of "what are the registers commonly used in Vim". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Register content cache commonly used copy command text knowledge system cut two program industry different practical so that in between ten numbers places Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Xiaomi Apple Shulou Tech Info Redmi