Scenario:

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?

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

migrated from stackoverflow.com Dec 1 '09 at 19:28

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

1 Answer

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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