title: Vim - yank into search register
body: <p>Is there any easy/quick way to "yank" into vim's "last search" register ("/)?</p>
  
  <p>From the vim documentation, it appears that the answer is no, but that it can be assigned via a "let" command:</p>
  
  <pre><code>It is writable with ":let", you can change it to have 'hlsearch' highlight
  other matches without actually searching.  You can't yank or delete into this
  register.
  </code></pre>
  
  <p>Ideally what I'd like to do is something like:</p>
  
  <pre><code>"/5yw
  </code></pre>
  
  <p>which would yank the next 5 words under the cursor &amp; put them in the last search buffer</p>
  
  <p>Alternatively, if there is a way to search for the contents of a named register, that would work too.  In other words, if I could do:</p>
  
  <pre><code>"A5yw
  </code></pre>
  
  <p>and then search for what is in register A, that would work too.</p>
  
  <p>The closest I can come is to yank into a named register &amp; then copy that register into the last search register, e.g.</p>
  
  <pre><code>"A5yw
  :let @/=@A
  </code></pre>
  
  <p>At the risk of making a long question longer, I want to state that it's not always 5 words I'd like to "yank &amp; search" -- sometimes it's 17 characters, sometimes it's to the end of the line, etc... so a hard-coded macro doesn't give me the flexibility I'd want.</p>