title: Substitute with contents of register or lines range from elsewhere in file in Vim
body: <p>I'm using Vim, and I want to substitute some placeholder text with a long string, that spans several lines, which is already written somewhere else in the file.</p>
  
  <p>Is it possible to replace a pattern with the contents of a register? Something like</p>
  
  <pre><code>:%s/foo/&lt;contents of register A&gt;
  </code></pre>
  
  <p>Otherwise, is it possible to replace with a range of lines? something like</p>
  
  <pre><code>:%s/foo/&lt;content of lines from 10 to 15&gt;
  </code></pre>