vim-vinegar
vim-vinegar copied to clipboard
How to kill a stray vinegar buffer?
I've had this bug various times while using vinegar, but I'm not sure how to reproduce it. I find that after a while of usage there's a vinegar window in my buffer list (I use [b and ]b from vim-unimpaired) and I can't get rid of it in any way, except restarting vim.
It is a bit annoying because it actually breaks ]b and [b, by preventing me from accessing all open buffers somehow.
I can open a file using this stray window, but this doesn't get rid of it. Using [b and ]b it will appear again. I've tried :bd when the vinegar window is active, but to no avail.
Is there any way to kill a stray vinegar-window? And related to it, is it possible to exit a vinegar-window without actually opening a file? This seems like a vital feature but I could not figure out how to do it so far.
I don't have much to suggest other than :bwipe.
Is this not the same issue as https://github.com/tpope/vim-vinegar/issues/13 ? This is what drove me to create https://github.com/justinmk/vim-dirvish .
@tpope: Unfortunately :bwipe does not help. Does this not happen at all to you? This happens very frequently for me and is incredibly annoying because I have to restart vim to get rid of it, so I'm starting to think something with my setup and/or workflow is wrong. I mean, I assume you're a heavy user of this plugin?
@tpope, @justinmk, and @arechsteiner: does the patch
❯ git diff
diff --git a/plugin/vinegar.vim b/plugin/vinegar.vim
index 28adce4..a59e279 100644
--- a/plugin/vinegar.vim
+++ b/plugin/vinegar.vim
@@ -29,7 +29,7 @@ if !exists("g:netrw_special_syntax")
endif
let s:netrw_up = ''
-nnoremap <silent> <Plug>VinegarUp :call <SID>opendir('edit')<CR>
+nnoremap <silent> <Plug>VinegarUp :call <SID>opendir('Explore')<CR>
if empty(maparg('-', 'n'))
nmap - <Plug>VinegarUp
endif
reduce the number of stray vinegar buffers? Actually, the fix appears to be relevant only, if you do occasionally set hidden. See the discussion in #74.
I'm not currently using vim-vinegar, I switched back to NERDTree (although I can't remember why exactly).
Have something similar.
On Ubuntu 16.04 works like a charm, the buffer disappears on :bnext or :bprev.
On Ubuntu 16.10 the buffer sticks there, :bd acts just like :bnext, and from that buffer :bprev does not work.
Both Ubuntus are running v7.4, they differ only in the Included patches, 1-1689 and 1-1829 respectively.
Confirmed the problem also in vim 8.0 (built from git repo).
I think an option to close vinegar would fix this issue
I'm also experiencing this issue, vinegar buffer stays in buffers list when I cycle buffers with :bnext / :bprev (even after :bwipe / :bdelete)
I would also love a way to kill a vinegar buffer. I regularly open it when I didn't mean to and have to restart vim to get rid of it
Me too. :bd/:bw don't help.