paulmillr/chokidar — pull request #55 by es128 (2013-10-01 15:34:51+00:00)
Title: Delay file removal to fix vim backupcopy issue

I wasn't able to reproduce the issue actually using vim, but I was able to do so using the `mv file.js file.js.swp && sleep .1 && mv file.js.swp file.js`. This patch does appear to cause the desired behavior of handling the event as a change instead of an unlink with no subsequent add.

Aside from a very slight delay in unlink events, I am not sure whether this will lead to unwanted side-effects. It would be great if people could try it out with various use-cases to see how it goes - particularly those who can consistently make it happen with vim.