Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

vim screw-up

Tom Dawson
Regular Advisor

vim screw-up


Yesterday, I was editing away in vim, and I inadvertently hit some keystrokes that are causing me a headache. Now, whenever I enter ":w" to save changes, I get prompted with the following:

WARNING: The file has been changed since reading it!!!
Do you really want to write to it (y/n)? y
Hit ENTER or type command to continue

The file being edited is write-enabled.

I think I may have been trying to do a search for "set", and inadvertently entered a set sequence that is causing the problem. But I'm clueless as to what it may be.

If I enter ":set" now, this is what the options are set to:

--- Options ---
backspace=2 helplang=en ruler viminfo='20,"50
cscopetag history=50 ttyfast t_Sb=^[[4%dm
cscopeverbose hlsearch ttymouse=xterm t_Sf=^[[3%dm

Does anyone have a clue as to what is causing me to get prompted everytime I try to save changes in a file?

Steven E. Protter
Exalted Contributor

Re: vim screw-up

You may have a copy of the file, usually .filename.swp sitting out there. Try deleteing the .swp files whre you are working.

Is it possible someone else is trying to edit the file?

Perhaps copy the vim settings back in from another machine where it functions correctly.

Steven E Protter
Owner of ISN Corporation
Tom Dawson
Regular Advisor

Re: vim screw-up



There are no *.swp files. No one else is editing the file(s).

I have another Linux machine at home. I'll get the "set options" from it tonight and try to load them tomorrow.

Tom Dawson
Regular Advisor

Re: vim screw-up

Well duh...

I implemented the Windoze fix. I rebooted and everything is back to normal.
Tom Dawson
Regular Advisor

Re: vim screw-up

As mentioned above, the reboot seems to have rectified the problem.