title: Vim - Capture strings on Search and use on Replace
body: <p>I have a css selector such as:</p>
  
  <pre><code>#page-site-index .toolbar .items {
  </code></pre>
  
  <p>How do I capture the ".toolbar .items" part and use it on Replace part of Vim S&amp;R, so this selector can turn into:</p>
  
  <pre><code>#page-site-index .toolbar .items, #page-site-login .toolbar .items {
  </code></pre>
  
  <p>Something like:</p>
  
  <pre><code>%s:/#page-site-index \(.toolbar .items\)/#page-site-index (the captured string), #page-site-login (the captured string)/g
  </code></pre>
  
  <p>Btw, I'm using the terminal version of Vim.</p>