title: How to search for a percent symbol (%) in Vim?
body: <p>I'm trying to do a global find and replace for old-style PHP tags that look like this:</p>
  
  <pre><code>&lt;%= $username %&gt;
  </code></pre>
  
  <p>However when I try to do a search and replace in Vim, I get an "E71: Invalid character after \%" warning, and a "E476: Invalid command" warning:</p>
  
  <pre><code>:%s/\&lt;\%/other val/c
  </code></pre>
  
  <p>I've also tried:</p>
  
  <pre><code>:%s/\&lt;\\%/other val/c     " two escapes, returns no matches
  </code></pre>