Vim/gVim 中是否有命令可以将两个或多个选项卡合并到一个拆分窗口中?
是否可以将在 gVim 中单独选项卡中打开的两个文件并将它们合并到一个具有 split/vsplit 窗口的选项卡中?我希望有一种方法可以指定要加入哪些选项卡,但即使是与 :tab ball 相反的东西也足够了。
谢谢
Is it possible to take two files that are open in separate tabs in gVim and combine them into one tab with a split/vsplit window? I'd prefer if there was a way to specify which tabs to join, but even something that is the opposite of :tab ball would be good enough.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
很多手工工作,但是...
或者您可以为其创建一个函数,该函数要求缓冲区编号,然后创建选项卡,并关闭所有其他选项卡(对于打开的文件)...
Lots of handwork but...
Or you can create a function for it which asks for buffer numbers, then creates the tab, and closes every other tab (for the opened files)...
在选项卡之间移动当前窗口”页面上发布了几个函数 Vim Tips Wiki 应该可以实现您想要的功能,或者可以轻松修改以获得您想要的功能。
There are a couple of functions published on the “Move current window between tabs” page in Vim Tips Wiki that should do what you want, or be easily modifiable to get exactly what you want.
试试这个脚本:
TabMerge
http://www.vim.org/scripts/script.php?script_id=1961
Try this script:
TabMerge
http://www.vim.org/scripts/script.php?script_id=1961
这对我有用:
TabMerge
如果您使用Plug,只需添加以下内容到你的 ~/.vimrc:
插入 'vim-scripts/Tabmerge'
This one worked for me:
TabMerge
If you're working with Plug, just add the following to your ~/.vimrc:
Plug 'vim-scripts/Tabmerge'