vim-vinegar icon indicating copy to clipboard operation
vim-vinegar copied to clipboard

How to kill a stray vinegar buffer?

Open arechsteiner opened this issue 9 years ago • 11 comments

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.

arechsteiner avatar Apr 15 '16 09:04 arechsteiner

I don't have much to suggest other than :bwipe.

tpope avatar Apr 15 '16 19:04 tpope

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 .

justinmk avatar Apr 17 '16 23:04 justinmk

@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?

arechsteiner avatar Apr 19 '16 11:04 arechsteiner

@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.

kiryph avatar Nov 02 '16 17:11 kiryph

I'm not currently using vim-vinegar, I switched back to NERDTree (although I can't remember why exactly).

arechsteiner avatar Nov 16 '16 14:11 arechsteiner

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.

xarvh avatar Dec 13 '16 10:12 xarvh

Confirmed the problem also in vim 8.0 (built from git repo).

ghost avatar Dec 14 '16 04:12 ghost

I think an option to close vinegar would fix this issue

sachka avatar Jan 18 '17 10:01 sachka

I'm also experiencing this issue, vinegar buffer stays in buffers list when I cycle buffers with :bnext / :bprev (even after :bwipe / :bdelete)

dmitriyK1 avatar Jan 13 '19 22:01 dmitriyK1

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

iryan2 avatar Mar 01 '19 00:03 iryan2

Me too. :bd/:bw don't help.

paddor avatar Dec 29 '20 03:12 paddor