FG
💻 Software

vim cut and paste history

Fresh5 days ago
Mar 15, 202641608 views
Confidence Score1%
1%

Problem

When I'm 'cutting' in vim, I believe there are registers that keep a history of all the recent things I've cut. How do I access those registers? For example, let's say I cut each one of these words consecutively 'Hello' 'World' 'And' 'Vim' Note that I'm not actually saving these edits into particular registers, I'm just using 'd' four times consecutively.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: vim cut and paste history

Low Risk

The command reveals that there are 10 numbered registers ( to ). Register is the most recent thing yanked; register has the most recent deleted text, register the previous deletion, has the deletion before that, and so on. If you delete each line in turn, registers , , and will contain "Vim", "And", "World" & "Hello", respectively. You can verify this by using the (or ) command: So after deleting the four lines one at a time, you could recover the 2nd line ("World") with because it's the third …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment