在特定窗口(或最后一个活动窗口)中从 NERDtree 打开文件
在 VIM 中,我打开了 4 个窗口和一个 NERD 树,如下所示: 因此,每当我尝试从 NERD 打开文件时,它都会在第一个缓冲区(左上位置)中打开。有时在其他缓冲区中。 有没有办法打开右下角的文件? Mb有解决方法吗? 也许我可以强制 NERDtree 在最后一个活动窗口中打开文件?目前,它不能以这种方式工作:(
UPD:看起来问题出在隐藏缓冲区中。 当缓冲区在一个窗口中打开,然后被另一个窗口替换时 - 如果您尝试在另一个窗口中打开第一个缓冲区,您将在第一次打开的窗口中打开它。
In VIM I've got 4 windows opened and a NERD tree like this:
So, whenever I try to open the file from NERD, it's opened in first buffer (topleft pos). Sometimes in other buffers.
Is there a way to open a file in bottom right position ? Mb there are workarounds ?
Maybe I can force NERDtree to open file in last active window ? At the moment, it doesn't work this way :(
UPD: It looks like the problem is in hidden buffers.
When the buffer was opened in one window, and then replaced by another - if you try to open the very first in another window, you'll get it opened in the window it was opened in the very first time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 Vim 7.2 上使用 NERD tree 4.1.0,并且 NERDTree 默认在最后一个活动窗口中打开文件。
来自文档:
但是选择文件后按 Enter 键也有相同的效果。
I'm using NERD tree 4.1.0 on Vim 7.2 and NERDTree does open files in the last active window by default.
From the docs:
But hitting enter when the file is selected has the same effect.