Download raw body.
Improvement for vi(1) paste comand (updated diff)
On Mon, Feb 16, 2026 at 11:42:02PM -0700, Andy Bradford wrote: > When I type: 3yy and move the cursor down 10 lines with 10j, and then > press p, I expect my cursor to remain on that line so I can then press O > to open a new line above the lines I just pasted. It seems like your > proposed change would have me now paste my lines and then have to > remember that I yanked three lines so I can move my cursor back using 3k > to open a line above them? What happens if I have saved my yanked lines > in a named buffer and don't remember how many lines are in it? Oh, sure, > I guess I can use "disp b" to look at the named buffers and count them, > but that's something I've rarely needed to do. I rarely, if ever have > needed to paste a buffer 3 times in a row to achieve the supposed > problem that you describe. > > Is this usage enhanced by your proposed change? If so, how? What if the intention is to continue editing *after* the pasted text? This reverses the situation, in this case the advantage is for the behavior I propose. At this point, someone may think that "current behavior vs. proposed one" contest is tied, right? However, who really paid attention to all what my diff does, surely noticed that I intentionally left the 'P' command untouched. If you want the cursor to land in the first line of the pasted block you can just position the cursor in the next line and type 'P'. This means that, at least in the particular case you described, the behavior I propose represents a win-win situation. -- Walter
Improvement for vi(1) paste comand (updated diff)