MiniBufExplorer 和 NERD_Tree 关闭缓冲区出现意外行为

发布于 2024-07-30 21:00:24 字数 331 浏览 5 评论 0原文

我安装了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ヅ她的身影、若隐若现 2024-08-06 21:00:25

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

独守阴晴ぅ圆缺 2024-08-06 21:00:24

我不确定这是否能解决您的所有问题,但我对 minibufexplorer/NERDTree 也有类似的扭曲行为,并发现 Vim Tip 165 的 bclose 函数解决了大部分错误 - 特别是使用我从 Gary Bernhardt 的 .vimrc 适当地重新映射 :bd 命令:

" GRB: use fancy buffer closing that doesn't close the split
cnoremap <expr> bd (getcmdtype() == ':' ? 'Bclose' : '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:

" GRB: use fancy buffer closing that doesn't close the split
cnoremap <expr> bd (getcmdtype() == ':' ? 'Bclose' : 'bd')
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文