title: How to delete empty lines in multi-ranges in Vim
body: <p>I get a text file:</p>
  
  <pre><code>&lt;p&gt;...&lt;/p&gt;
  &lt;pre&gt;
  ...
  
  ...
  ...
  ...
  &lt;/pre&gt;
  &lt;p&gt;...&lt;/p&gt;
  &lt;p&gt;...&lt;/p&gt;
  &lt;p&gt;...&lt;/p&gt;
  &lt;pre&gt;
  
  ...
  ...
  
  ...
  &lt;/pre&gt;
  &lt;p&gt;...&lt;/p&gt;
  </code></pre>
  
  <p>Notice that: there are some <strong>empty lines</strong> between <strong>[pre]...[/pre]</strong>.<br>
  I want to delete them.<br>
  But, I want keep those in <strong>[ p]...[/p]</strong><br>
  The text file becomes:</p>
  
  <pre><code>&lt;p&gt;...&lt;/p&gt;
  &lt;pre&gt;
  ...
  ...
  ...
  ...
  &lt;/pre&gt;
  &lt;p&gt;...&lt;/p&gt;
  &lt;p&gt;...&lt;/p&gt;
  &lt;p&gt;...&lt;/p&gt;
  &lt;pre&gt;    
  ...
  ...    
  ...
  &lt;/pre&gt;
  &lt;p&gt;...&lt;/p&gt;
  </code></pre>
  
  <p>I use the cmd below to located them:</p>
  
  <pre><code>/&lt;pre&gt;\n\zs\_.\{-}\ze\n&lt;\/pre&gt;
  </code></pre>
  
  <p>But I don't know what to do next!<br>
  I need a <strong>one-line-cmd</strong> to do this.<br>
  Any idea? Thanks!<br>
  The simpler, the better!<br>
  <hr>
  <strong>Edit:</strong>
  Thank you all. I just figure out how to do it with the help of my <a href="https://stackoverflow.com/questions/3050797/how-to-alphabetize-a-css-file-in-vim">another question</a></p>
  
  <pre><code>:g/&lt;pre&gt;/,/&lt;\/pre&gt;/s/^$\n//
  </code></pre>