60
10
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.
3This answer leaves out an important detail: Only deletions of one line or more are stored in the history this way. If you delete the words in the way that OP described in the question (using
d
four times, instead ofdd
) then all but the last deleted one are lost. – Alexander Rechsteiner – 2016-07-13T16:23:54.327This is perfect; however, what I want the most recent 'yanked' text? – Alexey – 2010-10-26T17:01:07.433
So you would use: p (which means the same as "0p) – njd – 2010-10-27T18:30:22.797
1Also pay attention to the special registers, especially "*" and "+", when you read
:help registers
. Very useful. – Daniel Andersson – 2012-02-15T09:09:42.8403Gods, you learn something new every day as a vimmer. It's great. Thanks, @njd. – ELLIOTTCABLE – 2012-11-22T16:42:12.593