title: How to find and replace upper and lowercase and keep capitalization in Vim
body: <p>Let's say I have:</p>
  
  <pre><code>foo and Foo
  </code></pre>
  
  <p>How can I find and replace it to</p>
  
  <pre><code>bar and Bar
  </code></pre>
  
  <p>With one regex/find and replace command in Vim? By default I have my Vim setup to find either uppercase and lowercase when searching. Now I just want to replace keeping the capitalization. Is this even possible?</p>