Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Say I've yanked the text "foo" into register x. How can I search my file for the contents of that register?

I know that I can type / to search, then Control+R followed by x to paste the contents of that register, leaving me with /foo. But I'm trying to use the name of the register instead.

For example, I tried /@a, but that doesn't work.

share|improve this question

That's basically the easiest way to do it. If you want to script it, you could use something like this:

:execute '/' . @x
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.