title: To comment out matches in Vim - independent on comment leader?
body: <p>I want to comment out lines in some code I have.  I have different kinds of codes, and they use different comment leaders.  E.g. in latex: '%', in Fortran 90: '!' and in python: '#'.  I want to do a substitute command that looks something like this:</p>
  
  <pre><code>:g/&lt;search-string&gt;/s/^/&lt;add-comment-leader-here&gt;/
  </code></pre>
  
  <p>If this is possible, I could also make a command in Vim that automatically commented out the selected text.  Something like this:</p>
  
  <pre><code>vmap &lt;z&gt; :'&lt;,'&gt;s/^/&lt;add-comment-leader-here&gt;/
  </code></pre>
  
  <p>Any ideas are welcome! :)</p>