3 ms·
In vim, it depends on the value of backupcopy. If set to "auto" (a default-default on linux, but maybe not for a specific distribution's default vimrc), the beh
by fl0wenol 6y ago
In vim, it depends on the value of backupcopy. If set to "auto" (a default-default on linux, but maybe not for a specific distribution's default vimrc), the behavior is to check to see if the number of hardlinks to a file is greater than one, and then write the modified version in place, otherwise use the write and rename strategy.
See: https://github.com/vim/vim/blob/95f0b6e5a5e5861da34cc064c601faf4eeed4ed6/src/bufwrite.c#L1177 https://github.com/vim/vim/blob/95f0b6e5a5e5861da34cc064c601...