I'm using MacVim and to save all opened files when the window loses focus I have the following in my .vimrc file:

au FocusLost *  :silent wa

This works great except it also saves my current NERDTree view into files... 'NERDTree_1, NERDTree_2, etc.

Any way to exclude NERDTree form the :wa command? Thanks.

link|improve this question
1  
These files should not be getting written at all, since the author has code to set the 'buftype' option to "nofile" on the buffers NERDTree creates. What version of NERDTree are you using? – Heptite Mar 9 '11 at 17:52
I'm using the latest version of NERDTree pulled down from github. From what I've found defining an autocommand overrides the "nofile" setting. Still not clear on how to fix it. – Moudy Apr 14 '11 at 13:44
In my tests, using your autocmd, files with 'buftype' of "nofile" never get written, not even NERDtree buffers. – Heptite Apr 14 '11 at 19:12
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.