4

This has been plaguing me for a while now, but I've only just recently been able to come up with an MCVE.

The problem is that when autochdir is on and I use :Explore to open netrw sometimes it will set the buftype of the original buffer to nofile. This is very annoying as if I come back to the buffer later and try to save it, I get the error E382: Cannot write, 'buftype' option is set. I then have to set buftype= to save. I know I'm not the only one who has seen this.

MCVE: set autochdir. Open an already existing file and make an edit (don't save). Use :Explore to open netrw. Close the netrw window. Use :Explore to open netrw again. Return to the original file and note: set buftype?. It should be set to nofile.

I'm using vim 8.0.69 on Win7. It happens on both vim and Gvim. Can anyone else reproduce this, and do you have any suggestions on how to get it to stop? (Other than unsetting autochdir)

  • you should report this to Charles (or better yet, check if the latest upstream netrw package also has this problem and then report to Charles) – Christian Brabandt Nov 23 '16 at 15:48
  • Sure, I'll look into that. I was just going to try here first in case it's not a bug and just something I'm not understanding/not doing right. – Tumbler41 Nov 23 '16 at 15:53
3

I contacted Dr. Chip and he confirmed that it was indeed a bug. He has since fixed the bug. The most recent version (162g as of this writing) is available on his website.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.