Reputation: 336
I'm new to VIM so I was doing the VIM tutorial and in the Lesson 7.2 it asks to edit the .vimrc file in the ~/.vimrc directory by typing this command: :e ~/.vimrc
but I get an error E37: No write since last change (add ! to override)
I didn't know what to do so I tried to find if that file existed but it didn't. I searched for "Where is my .vimrc file" and found this answer: https://stackoverflow.com/a/10921485/5220885 but I don't know how to create it, I wanted to ask in the comments but I don't have enough reputation.
Upvotes: 0
Views: 456
Reputation: 53000
Your error has nothing to do with .vimrc
as such, rather it is simply Vim warning you that you are trying to edit a different file when you are already editing another one with unsaved changes.
If you write the changes to your current file, :w
, first you won't get the error. Alternatively as the error suggests you can discard the changes and switch to editing .vimrc
by adding the exclamation mark to the command, :e! ~/.vimrc
Of course you can just type vim ~/.vimrc
in the Terminal to open and edit the file.
HTH
Upvotes: 4