Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I open a file, I edit it. After I began editing, the file is modified by another program. Finally, I save the file.

In that case, Vim would provide that helpful warning:

WARNING: The file has been changed since reading it

Do you really want to write to it (y/n)?

But Textmate will overwrite the file silently, which can result in unpleasant data loss (in my case, a de facto revert on Git). How can I prevent that?

share|improve this question

migrated from Dec 1 '09 at 19:28

This question came from our site for professional and enthusiast programmers.

You should try adding this question on it's much better suited to these types of questions. – Tom Dec 1 '09 at 17:14

Simple fix: change focus to another application before clicking save, if you expect this behavior to happen often on a particular file. If you change focus and come back, TextMate will detect the change.

Not sure why you have programs modifying files while you're working on them, but...there you have it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.