Emacs 上的选项卡式窗口 [英] Tabbed windows on Emacs

查看:25
本文介绍了Emacs 上的选项卡式窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试像 vim 那样在窗口中获取多个选项卡.在 vim 中,选项卡不绑定到缓冲区,您可以有多个选项卡,每个选项卡中都有多个拆分和缓冲区.到目前为止我发现的是:

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:

  • 标签栏:显示所有标签.
  • winring:不在窗口中显示标签,使用起来很笨拙(必须先命名每个标签).这是最接近我想要的.

如果可能的话,有人有什么想法吗?Tabs + emacs 难找;我发现的大部分内容都是关于空格与制表符的讨论:)

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.

推荐答案

我使用一个叫做 ElScreen,这让我可以做你正在寻找的东西.实际上,当我决定开始使用 Emacs 时,我也想要 VIM 的这个功能.

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.

以下是我用于 ElScreen 的代码,我什至使用了与您在 VIM 中使用的相同类型的键绑定.Control-C,后跟 tabe 或 tabd 以模拟 VIM 中的 :tabe:tabd.

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.

为了遍历下一个屏幕,或在本例中的选项卡,我使用 Control Meta _Control +.

To iterate through the next screen, or tab in this case, I use Control Meta _ and Control Meta +.

;; ---------------------------------------
;; load elscreen
;; ---------------------------------------
(load "elscreen" "ElScreen" t)

;; F9 creates a new elscreen, shift-F9 kills it
(global-set-key (kbd "C-c t a b e") 'elscreen-create)
(global-set-key (kbd "C-c t a b d") 'elscreen-kill)

;; Windowskey+PgUP/PgDown switches between elscreens
(global-set-key (kbd "C-M-_") 'elscreen-previous)
(global-set-key (kbd "C-M-+") 'elscreen-next)

这是一个实际的选项卡设置示例:

Here's an example of the tab setup in action:

第一个屏幕.

第二屏:

您可以在选项卡中使用 Cx3Cx2 拆分缓冲区 :)

You can have split buffers using C-x3 and C-x2 in a tab :)

这篇关于Emacs 上的选项卡式窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆