MiniBufExplorer 和 NERD_Tree 关闭缓冲区出现意外行为
我安装了 MiniBufExplorer 和 NERDTree。 当 NERDTree 窗口与具有大于 2 个可编辑缓冲区的 MiniBufExplorer 同时打开时,使用 :bd 关闭其中一个缓冲区会导致缓冲区清空,但窗口显示空缓冲区,而不是下一个或上一个缓冲区之一。 此外,刚刚关闭的缓冲区仍显示为 MBE 列表中选定的状态。 当我执行此操作时,窗口的布局如下:(N - NerdTree,M - MiniBufExpl,D - 文档窗口)
NNN MMMMMM
NNN DDDDDD
NNN DDDDDD
NNN DDDDDD
对于可能出现的问题有什么建议吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
:bd
对我有用(vim 7.2,mbe 6.3.2)。 它正在关闭当前缓冲区,将其从 mbe 的缓冲区列表中删除,然后打开另一个缓冲区。 只有最后一部分 - 打开另一个缓冲区 - 似乎有点不可预测:有时它是右侧的缓冲区,有时是左侧的缓冲区,有时又是另一个缓冲区。: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.我不确定这是否能解决您的所有问题,但我对 minibufexplorer/NERDTree 也有类似的扭曲行为,并发现 Vim Tip 165 的 bclose 函数解决了大部分错误 - 特别是使用我从 Gary Bernhardt 的 .vimrc 适当地重新映射 :bd 命令:
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's bclose function cured most of the faults - especially with a mapping I stole from Gary Bernhardt's .vimrc to remap the :bd command appropriately: