Sunday, July 6, 2014

Re: [BUG?] redir tromping yank register 0?

Let's set up a 2-line file:

hello
world

and have fun with the q command. You need to restart Vim before every example.

q"~q

:di reveals ~ has been written to "" and "0, which isn't that unusual.

ddq"~q

"" still matches "1, and q" only wrote to "0. That's odd.

ddq1~q

This wrote to "" and "1, but "0 is untouched.

The "" register behaves differently depending on whether you use delete/yank, :redir, :let, or q. (Am I missing any?) I don't know the internals, but I think of it as a pointer to the register the text is actually in. It has a special affinity for "0.

--
--
You received this message from the "vim_use" 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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: