Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.