Emacs 上的选项卡式窗口
我正在尝试像 vim 一样在窗口中获取多个选项卡。在 vim 中,选项卡不与缓冲区绑定,您可以有多个选项卡,每个选项卡中都有多个分割和缓冲区。到目前为止我发现的是:
- tabbar:显示所有选项卡。
- winring:不在窗口中显示选项卡,并且使用起来很笨拙(必须先命名每个选项卡)。这是最接近我想要的。
如果这可能的话,有人有什么想法吗? Tabs + emacs 很难搜索;我发现的大部分内容都是关于空格与制表符的讨论:)
更新: 这张照片展示了我想要的东西。
多个选项卡,每个选项卡上有一堆分割缓冲区。
I'm trying to get multiple tabs in windows like vim does it. In vim tabs aren't tied to buffers and you can have multiple tabs each with multiple splits and buffers in them. What I've found so far is:
- tabbar: shows all tabs.
- winring: doesn't show tabs in the window and is clunky to use (have to name each tab first). This is the closest to what I want.
Does anyone have any ideas if this is possible? Tabs + emacs is hard to search for; most of what I find are discussions of spaces vs tabs :)
Update:
This pic shows the kind of thing I want.
Multiple tabs and a bunch of split buffers on each tab.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我使用名为 ElScreen 的东西,它允许我做你正在寻找的事情。实际上,当我决定开始使用 Emacs 时,我也希望 VIM 提供此功能。
以下是我用于 ElScreen 的代码,我什至使用了与您在 VIM 中使用的相同类型的键绑定。 Control-C,后跟 tabe 或 tabd 以模拟 VIM 中的
:tabe
或:tabd
。要迭代下一个屏幕或本例中的选项卡,我使用 Control Meta _ 和 Control 元 +。
以下是正在运行的选项卡设置的示例:
第一个屏幕。
第二个屏幕:
您可以在选项卡中使用 Cx3 和 Cx2 分割缓冲区:)
I use something called ElScreen, which allows me to do what you are looking for. I actually also wanted this feature from VIM as well when I decided to start using Emacs.
The following is the code that I use for ElScreen, I even used the same type of keybindings as you would use in VIM. Control-C, followed by tabe or tabd to emulate the
:tabe
or:tabd
in VIM.To iterate through the next screen, or tab in this case, I use Control Meta _ and Control Meta +.
Here's an example of the tab setup in action:
First Screen.
Second Screen:
You can have split buffers using C-x3 and C-x2 in a tab :)
tabbar
是我认为迄今为止最受欢迎的软件包,但仅显示与您正在编辑的模式相同的缓冲区的选项卡(例如,如果您在 python 模式下处理文件,它仅显示所有 python 模式缓冲区的选项卡)。无论如何,这是默认行为;我很确定如果您愿意的话可以自定义它。但我的印象是,在 Emacs 中管理多个缓冲区的一种流行方法是使用ibuffer
和ido 模式
。例如,我的 .emacs 自定义包括tabbar
is by far the most popular package I think, but only shows tabs for buffers with the same mode you're editing (for instance, if you're working in a file in python-mode, it'll show tabs for all python-mode buffers only). That's the default behavior anyway; I'm pretty sure you could customize that if you wanted to. But my impression is that a popular way to manage multiple buffers in Emacs is withibuffer
andido-mode
. For instance, my.emacs
customizations include您可以执行 Cx 4 c 来克隆缓冲区:创建一个间接缓冲区,它是当前缓冲区的孪生副本。它允许您在不同的窗口中启用不同的主要模式来显示相同的缓冲区。
然后使用 tabbar 例如,您可以让不同的选项卡以不同的模式显示相同的缓冲区。
You can do C-x 4 c to clone a buffer : create an indirect buffer that is a twin copy of the current buffer. It allows you to show the same buffer with different major-mode enabled in different windows.
Then with tabbar you can have different tabs showing the same buffer in different modes for example.