tags:

views:

811

answers:

2

I have MiniBufExplorer and NERDTree installed. With a NERDTree window open at the same time as MiniBufExplorer with >2 editable buffers, closing one of the buffers with :bd causes the buffer to empty but the window to show the empty buffer and not one of the next or previous buffers. Also, the buffer just closed still shows up as selected in the MBE list. The layout of the windows when I perform this are as follows: (N - NerdTree, M - MiniBufExpl, D - Document window)

NNN MMMMMM
NNN DDDDDD
NNN DDDDDD
NNN DDDDDD

Any suggestions as to what might be the problem?

A: 

:bd works for me (vim 7.2, mbe 6.3.2). it is closing the current buffer, removing it from mbe's buffer list, and opening another one. only the last part - opening another buffer - seems to be a little unpredictable: sometimes it's the buffer to the right, sometimes the one to the left, and sometimes still another one.

ax
this answer was made before i changed the content of the question to provided more details on repeating the errant behavior
+1  A: 

I'm not sure if this will resolve all your issues, but I had similarly screwy behaviour with minibufexplorer/NERDTree, and found that Vim Tip 165[1]'s bclose function cured most of the faults - especially with a mapping I stole from Gary Bernhardt's .vimrc[2] to remap the :bd command appropriately:

" GRB: use fancy buffer closing that doesn't close the split cnoremap bd (getcmdtype() == ':' ? 'Bclose' : 'bd')

1: http://vim.wikia.com/wiki/VimTip165 2: bitbucket.org/garybernhardt/dotfiles/src/

Paraselene