你使用 Emacs 标签栏吗?

发布于 2024-09-24 21:11:44 字数 275 浏览 7 评论 0原文

emacs tabbar.el 包向每个窗口添加(缓冲区)选项卡,并且是 aquamacs 的标准配置,并且可以使用 emacs-goodies-el 包添加到 emacs23 中。

你们中有铁杆 emacs 用户真正使用 tabbar 吗?我有点习惯使用选项卡,但我想知道没有它们的工作是否会更有效率,以及除了检查缓冲区列表(Cx Cb)之外是否还有其他方法来获取当前项目文件的概述。

顺便说一句,我真的很喜欢 textmate 的项目抽屉(和选项卡),但 emacs 中任何类似的东西看起来都很丑陋。

The emacs tabbar.el package adds (buffer)tabs to each window and comes standard with aquamacs and can be added to emacs23 with the emacs-goodies-el package.

Are any of you hardcore emacs users actually using tabbar? I'm sort of used to having tabs, but I would like to know if working without them could be more productive, and if there are other ways besides checking your bufferlist (C-x C-b) to get an overview of your current project files.

As a side note, I really like textmate's project drawer (and tabs), but anything similar in emacs looks just plain hideous.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

不乱于心 2024-10-01 21:11:44

我尝试过使用它,但我觉得它限制了我的工作流程而不是改进它。有很多优秀的 Emacs 模式可以帮助组织许多缓冲区,但我根本不认为将缓冲区映射到选项卡是其中一种方法。

想想最基本的场景——很多选项卡。不同程序如何处理——限制最大选项卡数(IntelliJ IDEA);启用标签栏滚动(Firefox);无限减小标签大小(Google Chrome);创建多行选项卡(IntelliJ IDEA)...这些解决方案都不是那么好,并且由于 Emacs 中没有选项卡,我们就少了一个需要担心的问题。至少这是我的主观意见 - 其他人肯定会不同意......我个人只需要idoiswitchb

ido 实际操作视频:http://www.youtube.com/watch?v=lsgPNVIMkIE< /a>

I've tried using it, but I felt it constraint my workflow rather than improve it. There are a lot of excellent Emacs modes to help with the organization of many buffers and I simply don't feel mapping buffers to tabs is one of those ways.

Just think about the most basic scenario - a lot of tabs. How different programs deal with it - limit the maximum tabs(IntelliJ IDEA); enable tabs bar scrolling(Firefox); infinitely reducing the tabs size(Google Chrome); creating rows of tabs(IntelliJ IDEA)... None of this solutions is that great and by not having tabs in Emacs we have one less problem to worry about. At least this is my subjective opinion - others will most certainly disagree... I personally need nothing more than ido and and iswitchb.

A video of ido in action: http://www.youtube.com/watch?v=lsgPNVIMkIE

不离久伴 2024-10-01 21:11:44

是的,我使用 tabbar 和 sr-speedbar。

我自定义标签栏以显示特定组中的文件,并修改一些键绑定以使文件导航更容易。

FWIW,这是我的 ~/.emacs 中的相关部分:

(require 'tabbar)
; turn on the tabbar
(tabbar-mode t)
; define all tabs to be one of 3 possible groups: “Emacs Buffer”, “Dired”,
;“User Buffer”.

(defun tabbar-buffer-groups ()
  "Return the list of group names the current buffer belongs to.
This function is a custom function for tabbar-mode's tabbar-buffer-groups.
This function group all buffers into 3 groups:
Those Dired, those user buffer, and those emacs buffer.
Emacs buffer are those starting with “*”."
  (list
   (cond
    ((string-equal "*" (substring (buffer-name) 0 1))
     "Emacs Buffer"
     )
    ((eq major-mode 'dired-mode)
     "Dired"
     )
    (t
     "User Buffer"
     )
    ))) 

(setq tabbar-buffer-groups-function 'tabbar-buffer-groups)

(global-set-key [M-s-left] 'tabbar-backward)
(global-set-key [M-s-right] 'tabbar-forward)

emacswiki 上还有很多其他提示:
http://www.emacswiki.org/emacs/TabBarMode

Ya, I use tabbar, along with sr-speedbar.

I customize tabbar to show files in specific groups, and mod some keybindings to make navigating the files easier.

FWIW, here's the relevant section from my ~/.emacs:

(require 'tabbar)
; turn on the tabbar
(tabbar-mode t)
; define all tabs to be one of 3 possible groups: “Emacs Buffer”, “Dired”,
;“User Buffer”.

(defun tabbar-buffer-groups ()
  "Return the list of group names the current buffer belongs to.
This function is a custom function for tabbar-mode's tabbar-buffer-groups.
This function group all buffers into 3 groups:
Those Dired, those user buffer, and those emacs buffer.
Emacs buffer are those starting with “*”."
  (list
   (cond
    ((string-equal "*" (substring (buffer-name) 0 1))
     "Emacs Buffer"
     )
    ((eq major-mode 'dired-mode)
     "Dired"
     )
    (t
     "User Buffer"
     )
    ))) 

(setq tabbar-buffer-groups-function 'tabbar-buffer-groups)

(global-set-key [M-s-left] 'tabbar-backward)
(global-set-key [M-s-right] 'tabbar-forward)

There's lot's of other tips on emacswiki:
http://www.emacswiki.org/emacs/TabBarMode

无畏 2024-10-01 21:11:44

不。

我使用 iswitch-b

C-x b“缓冲区的前几个字母”,然后使用 Cs 旋转到我想要的特定文件,花费了不到 2 秒的时间,而无需将手移到鼠标上。

no.

I use iswitch-b

C-x b "first few letters of buffer", then C-s to rotate to the specific file I want takes me under 2 seconds without me having to move hand to mouse.

慕烟庭风 2024-10-01 21:11:44

不。我可能会被说服使用正确的自定义再次尝试,但默认情况下它对我来说毫无用处,因为我习惯性地打开了超过 100 个缓冲区。 ibuffer 及其过滤和分组是我尝试过的管理大量缓冲区的最佳方法。

No. I could possibly be convinced to try it again with the right customisation, but by default it's pretty useless for me, as I habitually have in excess of 100 buffers open. ibuffer with its filtering and grouping is the best way for managing large numbers of buffers that I've tried.

百合的盛世恋 2024-10-01 21:11:44

我喜欢使用速度栏进行快速缓冲区导航。我的 .emacs 中有

(speedbar-change-initial-expansion-list "buffers")
(global-set-key  [f8] 'speedbar-get-focus)

,所以当我按 F8 时,会弹出一个新框架,其中包含打开的缓冲区列表,您可以在其中将点移动到要选择的缓冲区上并激活它。再按一次 F8 返回主框架。

I like to use speedbar for quick buffer navigation. I have in my .emacs

(speedbar-change-initial-expansion-list "buffers")
(global-set-key  [f8] 'speedbar-get-focus)

so when I hit F8, a new frame pops up with a list of open buffers, there you can move point over the buffer you want to select and to activate it. One more F8 goes back to the main frame.

饮湿 2024-10-01 21:11:44

选项卡不是为鼠标用户保留的。看看 vim 可能的工作流程:gt 转到下一个选项卡,或 gT 转到上一个选项卡。假设您有一个专用于 vim 的窗口:您可以轻松地从一个缓冲区切换到另一个缓冲区。是的,选项卡可能适合缓冲区较少的用户。如果你有数百个,这将不起作用。

tabs are not reserved for mouse users. look at vim possible workflow: gt to go next tab, or gT to go previous. Say you've one dedicated window for vim: you might easily switch from one buffer to another. Yes, tabs are probably for users with few buffers. if you have hundreds, this won't work.

长不大的小祸害 2024-10-01 21:11:44

坦率地说,当谈到选项卡、菜单和工具栏时,您会发现比 emacs 更好的编辑器。 Emacs 明确鼓励您使用键盘并让鼠标处于休眠状态。

当您打开大量缓冲区时,选项卡栏或任何其他选项卡管理工具都会遇到困难。您也不希望在选项卡中显示所有缓冲区。当可以使用简单的击键代替时,必须将手从键盘上移开来抓住鼠标并单击选项卡,然后将手从鼠标上移开并将其放在键盘上,这显然是浪费时间。

您可以对您的 emacs 和您做的最好的事情就是在您的 .emacs 中进行以下配置:

(menu-bar-mode -1)          ;hide menu-bar
(scroll-bar-mode -1)            ;hide scroll-bar
(tool-bar-mode -1)          ;hide tool-bar

这将迫使您忘记使用鼠标执行操作的旧方法(例如使用选项卡栏或菜单...),并用手指代替。

Quite frankly, you'll find better editors than emacs when speaking of tabs, menus and toolbar. Emacs clearly encourages you to use your keyboard and leave your mouse asleep.

Tabbar or any other tab management tool will have difficulties when you'll have lots of buffers opened. You also don't want to show all your buffers in tabs. Having to remove your hand from the keyboard to grasp the mouse and click on a tab and then remove your hand from the mouse and put it onto the keyboard is clearly a waste of time when a simple keystroke could be used instead.

The best thing you could do to your emacs and to you is to have the following configuration in your .emacs :

(menu-bar-mode -1)          ;hide menu-bar
(scroll-bar-mode -1)            ;hide scroll-bar
(tool-bar-mode -1)          ;hide tool-bar

That will force you to forget the old way of doing things using a mouse (like using tabbar, or menus...), and to use your fingers instead.

街角卖回忆 2024-10-01 21:11:44

到目前为止,我还没有尝试过,但在我从 XEmacs 切换回 GNU Emacs 之前,我非常频繁地使用 XEmacs 选项卡。我发现当我打开许多源文件时,这是跳转到正确文件的最快方法之一。

现在我了解了 tabbar,我正在尝试它;到目前为止,我喜欢它。

  • 约翰

Up until now, I haven't tried it, but before I switched back to GNU Emacs from XEmacs, I used the XEmacs tabs very heavily. I found that when I had many source files open, it was one of the fastest ways to jump to the correct file.

Now that I know about tabbar, I am trying it; and so far, I like it.

  • John
秋心╮凉 2024-10-01 21:11:44

选项卡实际上只有在使用鼠标时才有用,而 Emacs(对我来说)的主要好处之一是我可以避免使用鼠标。

所以,不,标签栏一般来说没什么用。

我确实发现这些选项卡在浏览网页时很有用(使用 w3m),但我使用的是鼠标在这种情况下...

Tabs are really only useful if you use the mouse, and one of the main benefits (to me) of Emacs is that I can avoid the mouse.

So, no, tabbar isn't useful in general.

I did find the tabs useful when I was browsing web pages (using w3m), but I was using the mouse in that case...

北音执念 2024-10-01 21:11:44

Tabbar 看起来像是被上帝遗弃了

那么 elscreen 呢?

可以通过 http://melpa.milkbox.net/#/elscreen 找到 - 或安装的 emacs -elpa(或melpa)。

Elscreen 对我来说非常有用。

Tabbar looks like it is godforsaken

So what about elscreen?

Can be found via http://melpa.milkbox.net/#/elscreen - or installed emacs-elpa (or melpa).

Elscreen is very useful for me.

夏有森光若流苏 2024-10-01 21:11:44

Cx b 始终为您提供最后编辑的缓冲区。你用标签做什么?大多是切换回来&在两个文件之间来回移动。就这样吧。

C-x b<RET> always gives you the last edited buffer. And what do you do with tabs ? Mostly switch back & forth between two files. There you go.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文