3 ms·
That feature comes from emacs; hit ctrl-y to get ("yank") the last thing you copied, hit alt-y to get the previous thing you copied, and keep hitting alt-y in s
by kagevf 3y ago
That feature comes from emacs; hit ctrl-y to get ("yank") the last thing you copied, hit alt-y to get the previous thing you copied, and keep hitting alt-y in succession to cycle through the clipboard, which is called the "kill ring" in emacs.
I don't know if vim itself supports that feature, let alone vi mode on the command line. "Real" vim supports adding text to registers - does vi mode support it?
- pkulak 3y agoThis is the first I’ve heard of a “kill ring” thing, and it sounds wonderful. Pasting in Vim is generally a PITA because I always cut some word, then delete something to make room for it, which is itself another cut, and then I have to remember what register the thing I want is in now, and how to get at it. Double quote and then 9? I can’t even remember and I’ve been using Vim every day for a decade now.
- NegativeLatency 3y agoI set my vim clipboard to use the system one, and then use a system level clipboard manager it’s great https://github.com/TermiT/Flycut https://github.com/TermiT/Flycut
- kagevf 3y ago> Double quote and then 9? Interesting ... I checked the help using :h " and got to the bottom of it. So "0 is the most recent thing you copied - I use that all the time, it's very useful. Including ctrl-r 0 in insert mode. The other numbers 1 - 9 are the last thing that were cut either from a delete or a change, where "1 is the most recent, "2 the next recent, and so on. The trick, though, is that it has to be //more than 1 line// to automatically end up in a numbered register - unless you explicitly use a numeric register when cutting.