0

In my Vim editor I want to overwrite a file, so I type colon and start typing:

:saveas app/assets/javascripts/some.js

I get

E13: File exists (add ! to override)

How do I overwrite this file using saveas from Vim?

Nona
  • 5,302
  • 7
  • 41
  • 79
  • 1
    If says so in the message: `add ! to override`. So use `:saveas!`... Also be aware you can use `:help E13` to get more information (works with most error numbers). – Martin Tournoij Apr 05 '16 at 01:25
  • Thanks, I had no idea where to put the exclamation point....and I didn't realize you could do help E13. – Nona Apr 05 '16 at 02:28

1 Answers1

4

:saveas! filename

Take a look at this answer as well, it explains how to use the existing name, if you wanted to create a ".backup" Save file with new filename: append to existing filename

Community
  • 1
  • 1
kah608
  • 545
  • 2
  • 10