3 ms·
There are situations in which even vim will write directly to the file. When you do not have write permissions on the directory, vim will not be able to create
by raimue 6y ago
There are situations in which even vim will write directly to the file. When you do not have write permissions on the directory, vim will not be able to create a new file and will therefore "reuse" the existing file.
Edit: Here is the list in the vim source code when it will not use rename:
https://github.com/vim/vim/blob/95f0b6e5a5e5861da34cc064c601faf4eeed4ed6/src/bufwrite.c#L1172-L1176 https://github.com/vim/vim/blob/95f0b6e5a5e5861da34cc064c601...