When I open a file on a local HFS+ drive in TextMate2, it will pick up changes to the file if I edit it with another tool, or alter it at the command line.
This does not happen through files opened via rmate, or through files opened on SMB shares mounted on the local machine. I assume that there simply is no file-changed event to listen for in this case, but it would be nice if I'm wrong.
As a workaround, is there a simple way to trigger a refresh of the TextMate buffer? Since I have control of both the save within TextMate and (in this case) CVS update cycle, I can ensure a consistent state that way.
On Aug 22, 2012, at 3:53 AM, Jason McC. Smith jason@ncpod.org wrote:
[ files on remote drives ] I assume that there simply is no file-changed event to listen for in this case
Correct.
As a workaround, is there a simple way to trigger a refresh of the TextMate buffer?
There is not — TextMate should probably check on save, and warn if the file has been updated. But as you mention rmate, this is a bit problematic because rmate is a script that runs on your server and simply sends the file contents to TextMate and then gets the edited version back.
So rmate (the script running on your server) is the only one who can know when the file has been changed, but it can’t throw up a dialog or similar on your mac.
It could make a backup of the file before overwriting though. If you know ruby you can have a go at this yourself, we host the script here: https://github.com/textmate/rmate/
Okay thanks, but what about TextMate opening files directly that have been mounted locally, not using rmate? Is it possible to reload the file without a close/re-open cycle? There is a reload command for the file listing on the browser, but not for files.
Optimally I'd like a contextual menu item to Reload when right clicking in the buffer window. Tab too would be nice but I'd be happy with the buffer.
-- Jason
On Aug 22, 2012, at 4:48, Allan Odgaard mailinglist@textmate.org wrote:
On Aug 22, 2012, at 3:53 AM, Jason McC. Smith jason@ncpod.org wrote:
[ files on remote drives ] I assume that there simply is no file-changed event to listen for in this case
Correct.
As a workaround, is there a simple way to trigger a refresh of the TextMate buffer?
There is not — TextMate should probably check on save, and warn if the file has been updated. But as you mention rmate, this is a bit problematic because rmate is a script that runs on your server and simply sends the file contents to TextMate and then gets the edited version back.
So rmate (the script running on your server) is the only one who can know when the file has been changed, but it can’t throw up a dialog or similar on your mac.
It could make a backup of the file before overwriting though. If you know ruby you can have a go at this yourself, we host the script here: https://github.com/textmate/rmate/
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Aug 22, 2012, at 6:27 PM, Jason Smith jason@ncpod.org wrote:
[…] what about TextMate opening files directly that have been mounted locally, not using rmate? Is it possible to reload the file without a close/re-open […]
Not presently, sorry.
Though for close/re-open you can often just ⌘W + ⌘T + ↩.