Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing a file with vim doesn't fire a file change event on OS X

I am using watchdog to monitor .less file change events on OS X. If I change the contents of a .less file with TextMate or Sublime Text the modification event is captured. However, if I edit the content with vim no file modification event is fired (but file creation events for files created with vim are captured). I have seen the same behaviour with FSEvents and kqueue (both of which I have practically zero knowledge of).

I wonder can anybody explain this behaviour?

like image 867
John Keyes Avatar asked Sep 29 '11 01:09

John Keyes


1 Answers

On Watchdog's readme there is a section specifically targeting the problem you describe: About using watchdog with editors like Vim. It is suggested to use set noswapfile in your ~/.vimrc.

like image 165
Stefano Masini Avatar answered Oct 06 '22 17:10

Stefano Masini