NERDTree 和缓冲区处理
我已经设置了一个基于 VIM 和 NERDTree 的“IDE”,用于使用 FreePascal 进行编程。总的来说,它工作得很好,但我找不到如何告诉 NERDTree 更改它关于 VIM 缓冲区的默认行为。
目前,每次我在 NERDTree 中打开文件时,它都会创建一个新的缓冲区。如果文件已经在另一个缓冲区中打开,那么最好有一个快捷方式可以直接转到前一个缓冲区,而不是为同一文件创建一个新缓冲区。这对于必须在文件之间来回切换的程序员特别有用。
有什么提示吗?
I've setup an "IDE" based on VIM and NERDTree for programming using FreePascal. Overall, it's working great, but I can't find how to tell NERDTree to change it's default behavior regarding VIM buffers.
Currently, every time I open a file in NERDTree, it creates a new buffer. If the file is already open in another buffer, it could be nice to have a shortcut to just go to the former buffer, instead of creating a new one for the same file. This could be specially usefull for programmers who must go back and forth between files.
Any hint?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,只需阅读我的 .vimrc (实际上是 _vimrc :-( )来看看为什么它对我有用。
根据精湛但有点过时的 Vim 常见问题解答,一个自动命令可以帮助我:
OK, just had to read through my .vimrc (actually _vimrc :-( ) to see why it works for me.
According to the superb but slightly outdated Vim faq, an autocommand helps me: