title: Visual Studio Code - Remove blank lines from code
body: <p>I use Visual Studio Code as my preferred text editor and I have ran into a problem with regards to the formatting.  I have copied code from one file and pasted into another, however when I have pasted the code VSC has placed a blank line between every line with code. </p>
  
  <p>It is quite a big file so I am hoping there is a way to identify all the blank lines at once and remove them? </p>
  
  <p>This is how I want the code to look:</p>
  
  <pre><code>&lt;div&gt;
    &lt;h1&gt;&lt;/h1&gt;
    &lt;p&gt;&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>however, on paste it now looks like this:</p>
  
  <pre><code>&lt;div&gt;
  
    &lt;h1&gt;&lt;/h1&gt;
  
    &lt;p&gt;&lt;/p&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I have looked online but have been unable to find any direct answer to this :(</p>