I'm trying to use inotifywait
for monitoring specific folders and recompiling if needed. The problem is that I'm using vim heavily, and when I'm editing in vim any file modified actually triggers some 'redundant' events, something like:
:w
sass/somefolder/ CREATE 4913
sass/somefolder/ CREATE some
sass/somefolder/ MODIFY some
It took me some time to realize that actually everything is OK with inotifywait
- I've tried to use nano
and everything worked just as expected, only "MODIFY" is triggered, and only once.
I've tried to edit (just for test purposes, don't judge me hard) Emacs and there are problems with Emacs as well - each time I'm pressing Ctrl-X + Ctrl+S MODIFY triggers 3 times.
The question is how can I resolve issues with superfluous events in vim?
By the way, directory
and backupdir
in my .vimrc
are not in the folder that is monitored.
UPD: This link explains why actually things happen how they happen, but I still have no idea how to fix this. Well, of course I can ignore 4913 containing string, but this is too kludgy even for one who tries to use inotify to compile SASS)))
UPD: VIM version is 7.3.429