I wrote a plugin that executes a slow shell script and asynchronously shows the stdout in a popup (split) window. When I try to close my session while the popup is open, I get the message
Save changes to "popup.log"?
[Y]es, (N)o, (C)ancel
How can I automatically reject changes to this temporary buffer without rejecting changes to the files I am actually editing (as would happen with :qa!
)?
Is there some buffer-local option I can set that allows the buffer to changes but specifies "this is a temporary buffer, but never ever ask me to save changes"? Seems like lots of vim plugins do this (tagbar, NERDtree, etc.) but I don't know how.
setlocal buftype=nofile noswapfile
. See:h special-buffers
.