...
If the + and * registers are not modified by yank operations, then
shouldn't v:register = " when yanking text (3rd line in the above
sample). Since @+ is not modified at all.

:help v:register mentions nothing about the *effective register*, only the one supplied (and since 7.3.186, this considers the changed default for the "unnamed" and "unnamedplus" values).
v:register    The name of the register supplied to the last normal
mode command.  Empty if none were supplied. |getreg()| |setreg()|

In my understanding, v:register is mainly necessary for custom operations that work with registers, not for built-in commands like yank. Is your inquiry about theoretical correctness, or do you have an actual use case that is affected by this? In the latter case, I would agree that v:register should account for the yank command. (But I don't know how easy that would be to implement.)

Then YankRing plugin (http://www.vim.org/scripts/script.php?script_id=1234) relies upon v:register to determine:
a) which register to capture changes from
b) which register to update when retrieving the next value (from the ring) for pasting

Unfortunately, there really is no work around for it either.

I could choose "+yy, or in this case yy. There is no way to distinguish those commands.

Dave

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui