title: Too many inotify events while editing in vim
body: <p>I'm trying to use <code>inotifywait</code> 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:</p>
  
  <pre><code>:w
  sass/somefolder/ CREATE 4913
  sass/somefolder/ CREATE some
  sass/somefolder/ MODIFY some
  </code></pre>
  
  <p>It took me some time to realize that actually everything is OK with <code>inotifywait</code> - I've tried to use <code>nano</code> and everything worked just as expected, only "MODIFY" is triggered, and only once.</p>
  
  <p>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.  </p>
  
  <p>The question is how can I resolve issues with superfluous events in vim?</p>
  
  <p>By the way, <code>directory</code> and <code>backupdir</code> in my <code>.vimrc</code> are not in the folder that is monitored.</p>
  
  <p>UPD: <a href="https://bugzilla.redhat.com/show_bug.cgi?id=427711" rel="noreferrer">This link explains</a> 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)))  </p>
  
  <p>UPD: VIM version is 7.3.429</p>