title: Stop vim from dynamically updating folds
body: <p>Is there any way to stop vim from automatically updating folds on the fly? I really love vim's folding, and I prefer having it in syntax mode so that folds are created as I type. But for instance when I code C++ and I write a bracket { it automatically closes all subsequent folds, and when I then close the bracket again with a }, vim automatically expands all subsequent folds, meaning that I have to refold everything.</p>
  
  <p>Another related problem, if I have the same document open in a different buffer, say I have run ":split", then writing an open bracket { will nest all folds in the buffer under the fold in which I opened the bracket, and closing it will un-nest the folds but also close all of them. If I use either "." or "->" to access a member function/variable, it resets all folds in the buffer to be whatever the current foldlevel is, regardless of which folds I have opened/closed myself.</p>
  
  <p>This is somewhat frustrating when I have the same document open in two buffers so I can read the contents of one function when writing another, as I constantly have to switch buffers and reopen my folds.</p>
  
  <p>In my .vimrc I have</p>
  
  <pre><code>set foldmethod=syntax
  </code></pre>
  
  <p>and that is about it. For autocompletion I use clang-complete and supertab with:</p>
  
  <pre><code>let g:SuperTabDefaultCompletionType = "&lt;c-x&gt;&lt;c-u&gt;&lt;c-p&gt;"
  </code></pre>
  
  <p>I think that is everything which migh affect this.</p>
  
  <p>Edit:</p>
  
  <p><a href="http://imgur.com/a/aO9ko" rel="noreferrer">Added some pictures to help illustrate the problem</a></p>