Hi,
Textmate (version: 2.0.6 ) on macOS Hign Sierra (10.13.6)
I use electron-vue to automatically reload the page if file modified, and every time I close the tab, textmate automatically update mtime of the file. Are there any configuration option that do not modify the mtime of the file when the tab is closed?
On 26 Mar 2020, at 7:50, 周彬 wrote:
I use electron-vue to automatically reload the page if file modified, and every time I close the tab, textmate automatically update mtime of the file. Are there any configuration option that do not modify the mtime of the file when the tab is closed?
The reason is that TextMate uses extended attributes to store things such as position of insertion point, selection etc.
You can disable this via `.tm_properties`. Create a `.tm_properties` file in the root of your project and let it contain this line:
disableExtendedAttributes = true
You can also create the file in `~` to disable the behavior globally, or you can limit it to certain file types, e.g. by using:
[ *.vue ] disableExtendedAttributes = true
Hey, Allan, what about this?
https://eclecticlight.co/2020/03/27/what-changes-a-files-modification-date-a...
I'm not saying you're wrong (I have no idea), but Howard says:
"Changing a file’s xattrs doesn’t alter the data in the file itself. Xattrs aren’t even stored in the main data area of a volume, but apart, in the file system metadata. So adding or changing a xattr won’t change the date of modification, nor the date that the file was last opened. In fact, unless you look at the xattrs using a utility such as my xattr editor xattred, you won’t even notice what’s happened."
I'm wondering how to test something like that. :)
-- Marc Wilson posguy99@gmail.com
On Sat, Mar 28, 2020, at 4:01 AM, Allan Odgaard wrote:
On 26 Mar 2020, at 7:50, 周彬 wrote:
I use electron-vue to automatically reload the page if file modified, and every time I close the tab, textmate automatically update mtime of the file. Are there any configuration option that do not modify the mtime of the file when the tab is closed?
The reason is that TextMate uses extended attributes to store things such as position of insertion point, selection etc.
You can disable this via `.tm_properties`. Create a `.tm_properties` file in the root of your project and let it contain this line:
`disableExtendedAttributes = true
`
You can also create the file in `~` to disable the behavior globally, or you can limit it to certain file types, e.g. by using:
`[ *.vue ]
disableExtendedAttributes = true `
TextMate mailing list TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
On 29 Mar 2020, at 22:22, Marc Wilson wrote:
I'm not saying you're wrong (I have no idea), but Howard says:
"Changing a file’s xattrs doesn’t alter the data in the file itself. Xattrs aren’t even stored in the main data area of a volume, but apart, in the file system metadata. So adding or changing a xattr won’t change the date of modification, nor the date that the file was last opened.
This is true, however, there is also a “time of last file status change” which *does* change when extended attributes are updated.
Most likely though electron-vue would use kqueue() or FSEvents to just detect that “something changed” in the directory and not actually look at file modification dates to verify that file data has actually changed.
I'm wondering how to test something like that. :)
Here’s a test:
% stat test.txt|grep Change Change: 2020-03-29 22:55:57.799348845 +0700 % xattr -w foo bar test.txt % stat test.txt|grep Change Change: 2020-03-29 23:02:02.450048038 +0700
Most likely though electron-vue would use kqueue() or FSEvents to just detect that “something changed” in the directory and not actually look at file modification dates to verify that file data has actually changed.
Thank you! I found that electron-vue dependencies include fsevent.
------------------ 原始邮件 ------------------ 发件人: "Allan Odgaard"<mailinglist@textmate.org>; 发送时间: 2020年3月30日(星期一) 凌晨0:04 收件人: "TextMate users"<textmate@lists.macromates.com>;
主题: [TxMt] Re: Why does textmate modify the file mtime after closing the tab?
On 29 Mar 2020, at 22:22, Marc Wilson wrote:
I'm not saying you're wrong (I have no idea), but Howard says:
"Changing a file’s xattrs doesn’t alter the data in the file itself. Xattrs aren’t even stored in the main data area of a volume, but apart, in the file system metadata. So adding or changing a xattr won’t change the date of modification, nor the date that the file was last opened.
This is true, however, there is also a “time of last file status change” which does change when extended attributes are updated.
Most likely though electron-vue would use kqueue() or FSEvents to just detect that “something changed” in the directory and not actually look at file modification dates to verify that file data has actually changed.
I'm wondering how to test something like that. :)
Here’s a test: % stat test.txt|grep Change Change: 2020-03-29 22:55:57.799348845 +0700 % xattr -w foo bar test.txt % stat test.txt|grep Change Change: 2020-03-29 23:02:02.450048038 +0700