gVim 中更好的选项卡导航
如何让 gVim 中的选项卡像大多数优秀 IDE 中那样工作?我特别说 gVim 是因为我使用的是 Vim 版本,但我对替代方案持开放态度。
我希望我的选项卡具有以下内容:
- Ctrl+Tab 转到 MRU(最近使用的)选项卡。
- 按住Ctrl,然后多次按Tab,每次按Tab时,都会继续更改到下一个最近使用的选项卡。
- 当 ctags 构建并工作时,您按 Ctrl+],如果这会将您带到另一个文件,则应该在新选项卡中打开该文件,或者如果选项卡包含该文件文件已经打开,它应该切换到该文件。
- 只需拖动鼠标即可轻松重新排序选项卡。
我将所有这些作为一个问题发布,因为我希望有一个好的单一解决方案可以完成所有或大部分这些事情,而不必单独破解每个自定义。我认为这将是我们大多数人的首选行为。
How can I get tabs in gVim to work like they do in most good IDEs? I say gVim specifically because that is the version of Vim that I use but I am open to alternatives.
I want the following things for my tabs:
- Ctrl+Tab goes to the MRU (most recently used) tab.
- Holding down Ctrl and then pressing Tab multiple times continues to change to the next most recently used tab every time you press Tab.
- When ctags are built and working and you press Ctrl+], if this takes you to a different file it should open that file in a new tab or if a tab with that file is already open it should switch to that one.
- Easy tab reordering with the mouse just by dragging them around.
I am posting all these as a single question because I am hoping there is a good single solution that will do all or most of these things instead of having to hack each customization in individually. I would think this would be the preferred behavior by most of us.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Vim 没有内置 MRU。不过,至少有 一个插件,但我已经从未使用过它。
Vim 中的选项卡与 IDE 中的选项卡不同,它们更像是透视图。 Vim 中 IDE 的选项卡相当于缓冲区和“(分割)窗口”。使用缓冲区的方法有很多种,包括 一些 原生 one 和 一些第三方插件。其中一些插件具有类似 MRU 的功能。
Vim wiki 有很多页面 关于 标签。
Vim has no built in MRU. There is at least one plugin for that, though, but I've never used it.
The tabs in Vim are not the same as the tabs in your IDE, they are more like perspectives. The equivalent of your IDE's tabs in Vim are buffers and "(split)windows". There are a number of ways to work with buffers including some native ones and a number of third party plugins. Some of these plugins have MRU-like features.
The Vim wiki has a bunch of pages about tabs.