Vim: numbered register 0 is not updated in Y

Created on 5 Jan 2017  路  4Comments  路  Source: VSCodeVim/Vim

What did you do?

yank a line with
Y instead of yy

What did you expect to happen?

The numbered register "0 is updated.

What happened instead?

The "0 is not updated.
Note: The "0 works for yy though.

Technical details:

  • VSCode Version: 1.8.1
  • VsCodeVim Version: 0.4.10
  • OS: Win-7 x64
kinbug

Most helpful comment

Right. So I identified what the issue is for me. It doesn't work if I am yanking from visual mode. All the others work. Essentially, If I want to yank, say, a block by doing: "V%y", my "0 reg won't be updated. However, if I do something like "yw" or "y$" or whatever, that works.

Basically, the issue is that yanking from visual mode does not update the "0 registry

All 4 comments

Hi - This is still not working for me btw:

Exact same problem.

Technical Details:

  • VSCode Version 1.19.3
  • VSCodeVim Version 0.10.13
  • OS: OSX High Sierra (10.13.2)

Works for me.

Please ensure you have the appropriate settings for:
https://github.com/VSCodeVim/Vim#vimoverridecopy
https://github.com/VSCodeVim/Vim#vimusesystemclipboard

You can use the :reg command to see whats in your registers.

Right. So I identified what the issue is for me. It doesn't work if I am yanking from visual mode. All the others work. Essentially, If I want to yank, say, a block by doing: "V%y", my "0 reg won't be updated. However, if I do something like "yw" or "y$" or whatever, that works.

Basically, the issue is that yanking from visual mode does not update the "0 registry

Also seems like it doesn't update with a command like 2yy. Perhaps multiline yanks aren't updating the register?

Either way though, I assume you'd be accepting PRs for this fix? If it's not too complex and nobody else has gotten to it, I'm willing to give it a go at fixing!

Was this page helpful?
0 / 5 - 0 ratings