Hi,
Not sure if this has been reported before, but here is how to reproduce the bug:
1. Open a file a.txt with TM2 Alpha. 2. Use another program, say Vim, to edit that file while it is opened by TM2, and save the changes. 3. Switch back to TM2 and the file name (window title) becomes a.txt~.
What should happen:
TM2 should prompt to reload the externally modified file instead of open Vim's temp file.
-Yi
It's possible that vim doesn't save a temporary file; rather, it renames the current file to the backup, and saves the new file as the original name. If this is the case (some editors do this), then TM is reflecting the open inode more than the file by name.
On Thu, Dec 29, 2011 at 10:26 AM, Yi Zhang yizhang84@gmail.com wrote:
Hi,
Not sure if this has been reported before, but here is how to reproduce the bug:
- Open a file a.txt with TM2 Alpha.
- Use another program, say Vim, to edit that file while it is opened by
TM2, and save the changes. 3. Switch back to TM2 and the file name (window title) becomes a.txt~.
What should happen:
TM2 should prompt to reload the externally modified file instead of open Vim's temp file.
-Yi
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 30/12/2011, at 00.03, Reaves, Timothy wrote:
It's possible that vim doesn't save a temporary file; rather, it renames the current file to the backup, and saves the new file as the original name. If this is the case (some editors do this), then TM is reflecting the open inode more than the file by name.
Indeed this is the case and I think vim should change its behavior, ideally it would save to a temp. file and use exchangedata(2) or rename(2) to then replace the org. file — first solution would preserve the file’s inode (good), second would not, but it would still not confuse TextMate and other programs “watching a file” (since the file just got overwritten with a new one, rather than moved).