title: here-document delete first line from file with vim like ed
body: <p>I am using this snippet code (just delete first line with <code>ed</code>). I wanna know if i can make something like this in <code>vim</code>. I wrote the script and passed the file as an argument.</p>
  
  <p>file:</p>
  
  <pre><code># This is a comment #
  
  foo bar
  </code></pre>
  
  <p>edit with <code>ed</code>:</p>
  
  <pre><code>ed $1 &lt;&lt; EOF
  1/^[ ]*$/d
  w 
  q
  EOF
  </code></pre>
  
  <p>I tried with <code>vim</code>:</p>
  
  <pre><code>vi $1 &lt;&lt; EOF
  dd
  w 
  q
  EOF
  
  &gt; Vim: Warning: Input is not from a terminal
  </code></pre>