Editing with vim clears Windows 10 file system archive bit.
Sun Nov 14 18:56:29 GMT 2021
Description of problem:
While using vim 8.2 on cygwin 3.3 (x86_64) on Windows 10,
when editing an existing file with vim and saving it, the Window’s
file system archive bit is always left cleared (not modified state).
This happens, whether the archive bit was set (is modified) or
clear (not modified) initially. Window’s backup tools rely on this
archive bit for making incremental backups.
The following scenarios DO work:
1. Using vim to create a new file,
leaves the new file’s archive bit set (is modified).
2. “cp” and redirect with append (“>>”),
leave the target file’s archive bit set (is modified).
3. “emacs” (emacs-w32) (ver. 27.2) worked for both editing and creating!
4. Editing with vim sets the “last modified date” correctly
for Linux and Windows.
Tools used to confirm the problem:
The cygwin tool, “cygcheck –c” listed “OK” as the status of every package.
The archive bit settings were confirmed with Window’s “File Explorer” and
The cygwin tool, “chattr,” could be used as a crude workaround,
but I rather have vim do it.
My search for solutions:
I have perused 8 years of “The Cygwin Archives” for this issue,
but could find nothing relevant.
Google Web searches, and stackoverflow.com, vim.org and
vi.stackexchange.com searches turned up nothing relevant.
On my local machine, a search of /usr/share/vim/vim82/doc/*.txt
turned up nothing relevant.
My update history:
10/2013 Cygwin-1.7.25 Windows 8 vim-7.3.1314 No problem with archive bit.
09/2021 Cygwin-3.2.0 Windows 10 vim-8.2.0486 Problem with archive bit.
11/2021 Cygwin-3.3.2 Windows 10 vim-8.2.0486 Problem with archive bit.
Can anyone shed some light on this issue?
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
More information about the Cygwin