Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to kill a stray vinegar buffer? #66

Open
arechsteiner opened this issue Apr 15, 2016 · 11 comments
Open

How to kill a stray vinegar buffer? #66

arechsteiner opened this issue Apr 15, 2016 · 11 comments

Comments

@arechsteiner
Copy link

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.

@tpope
Copy link
Owner

tpope commented Apr 15, 2016

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

@justinmk
Copy link

Is this not the same issue as #13 ? This is what drove me to create https://github.com/justinmk/vim-dirvish .

@arechsteiner
Copy link
Author

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

@kiryph
Copy link
Contributor

kiryph commented Nov 2, 2016

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

@arechsteiner
Copy link
Author

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

@xarvh
Copy link

xarvh commented Dec 13, 2016

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.

@ghost
Copy link

ghost commented Dec 14, 2016

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

@sachka
Copy link

sachka commented Jan 18, 2017

I think an option to close vinegar would fix this issue

@dmitriyK1
Copy link

dmitriyK1 commented Jan 13, 2019

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

@iryan2
Copy link

iryan2 commented Mar 1, 2019

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

@paddor
Copy link

paddor commented Dec 29, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants