Do you use Emacs tabbar?

北战南征 提交于 2019-11-30 10:46:59

问题


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.


回答1:


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




回答2:


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




回答3:


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.




回答4:


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.




回答5:


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.




回答6:


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.




回答7:


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...




回答8:


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.




回答9:


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



回答10:


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.




回答11:


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.



来源:https://stackoverflow.com/questions/3811126/do-you-use-emacs-tabbar

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!