Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

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

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

    
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

1 Answer 1

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

 
discard

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.