Do you use Emacs tabbar?
Asked Answered
A

11

32

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.

Auntie answered 28/9, 2010 at 8:56 Comment(0)
M
32

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

Malaguena answered 28/9, 2010 at 10:58 Comment(2)
+1 for ido mode. Do you have some more geek tools like that one? =)Harmless
I use C-x b with helm. Haven't tried iswitchb, but I guess it is similar. Man, I love helm!Thagard
D
22

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

Dispend answered 28/9, 2010 at 15:22 Comment(1)
Actually it works for my Emacs24.0.93 even without (setq tabbar-buffer-groups-function 'tabbar-buffer-groups).Nag
C
10

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.

Corporal answered 28/9, 2010 at 15:28 Comment(0)
E
7

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.

Ellieellinger answered 28/9, 2010 at 21:32 Comment(2)
Thanks, I wasn't aware of the ibuffer filter option.Auntie
I use the Filter by pathname trick (emacswiki.org/emacs/IbufferMode#toc9 ) to enable / f to match dired buffers too, and then / g to make a named group from the current filters. Most of the time, that's all I need to avoid getting overwhelmed :) You can save the filter groups if you're going to be working with them for a while, and you can rearrange them by C-k illing and C-y anking the group headers (except for Default which is always last).Ellieellinger
P
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.

Planetarium answered 28/9, 2010 at 12:55 Comment(0)
J
5

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.

Jacobsen answered 10/2, 2014 at 22:26 Comment(0)
P
3

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.

Prisoner answered 29/9, 2010 at 6:43 Comment(0)
F
1

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
Formal answered 28/9, 2010 at 12:22 Comment(0)
C
1

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

Cirro answered 28/9, 2010 at 15:20 Comment(3)
Note that w3m seems to do its own tabs -- and yes, they are quite useful, though a little tricky to open from a PuTTY session...Weasel
On the contrary. Just bind keystrokes Ctrl-PgUp and Ctrl-PgDn to commands for moving to the previous tab and the next tab, and you can navigate the tabs without using the mouse.Disapprove
Or this : christiantietze.de/posts/2022/02/emacs-tab-bar-numbered-tabs Switch to tabs directly by numbers.Cabinetwork
M
1

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.

Morrell answered 17/10, 2013 at 1:10 Comment(1)
elscreen seems to make my emacs screen flicker on carriage returns :( for no clear reason.Hermetic
G
0

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.

Grethel answered 3/6, 2011 at 17:22 Comment(1)
If the projects you are working on only have two files, then you clearly don't need any fancy buffer / tab / window / frame management...Cabinetwork

© 2022 - 2024 — McMap. All rights reserved.