title: editing a file with vim that has no EOL marker on the last line but has CRLF line endings
body: <p>I often have to edit script files, the interpreter for which treats files that have an EOL marker on the last line of the file as an error (i.e. the file is treating CRLF as "newlines", not as "line endings").</p>
  
  <p>Currently, I open these files in Vim using binary mode (-b on the command line).  It autodetects the lack of EOL on the final line and sets the "noeol" option appropriately, which prevents it from writing an EOL on the last line. </p>
  
  <p>Because the file has CRLF line endings, I get lots of <code>^M</code>s at the end of my lines (because it interprets only Unix-style line endings in binary mode, it seems).  I can't open it in text mode because the "noeol" option is ignored for non-binary files.</p>
  
  <p>This is very annoying, and I always have to remember to manually type the <code>^M</code> at the end of each line!  Is there some way I can force it to accept DOS-style line endings in binary mode, or force it to listen to the EOL option in text mode?</p>