title: Vim — replace ‘foo’ by ‘bar’ on lines NOT starting with ‘character’
body: <p>In Vim regular expression, I know it is possible to replace <code>foo</code> by <code>bar</code> on all lines starting with <code>%</code> using</p>
  
  <pre><code>:g/^%/s/foo/bar/g
  </code></pre>
  
  <p>but I want to replace <code>foo</code> by <code>bar</code> on all lines NOT starting with <code>%</code>. Is there a way to easily do so?</p>