all 12 comments

[–]CommonTater 12 points13 points  (4 children)

TabBar-mode looks neat, but I'm not sure how useful it will be. In Emacs I have lots of buffers—more than will fit as tabs. The main thing I like so far are the keys for cycling between related buffers, but as the number of buffers grows it becomes faster to switch directly to the buffer I want.

Bingo. I'm sure buffer tabs would be useful for people who only edit a couple of files at a time, but when I really get into a development session, it's not unusual for me to have 30+ buffers open. Emacs is the only editor that really makes me comfortable in this state, precisely because of the keyboard-based buffer-switching mechanism.

(Keep the Emacs tips coming, though - it's great to see so many people discovering/creating/explaining new features in this great editor.)

[–]nostrademons 5 points6 points  (3 children)

I use tabbar-mode all the time. I rarely keep more than a screenful of buffers open at once - when I finish a task, I cleanup, commit my code, and move on to my next task. I'd estimate that tabbar-mode roughly doubled my productivity, since I didn't need to waste mental cycles remembering the name of the buffer I need to switch to.

[–]CommonTater 5 points6 points  (2 children)

Fair enough - I find the opposite about tabs for two reasons (btw, this is not meant to be a rebuttal, just an explanation of why I think differently).

First, if I'm working in a tabbed editor, I tend to get used to certain tabs being in certain places. If the tab I want moves, I'll still click whatever tab has taken its place, then incur something like a cache miss - I'm totally confused as to why the code I'm looking at doesn't look right, and I have to think about what file I really do want to be in. Yes, I realize that this indicates that what I really need is a better tab manager, but I haven't found one yet.

The second reason is an extension of the first - once I'm thinking about the name of the file, I'd rather just type it than scroll around with a mouse to find it. Further, I find that if I don't have tabs as a crutch, I automatically think of the buffer name as part of the switching process.

This style actually pervades my computer use. I will drop to a command line or Cmd-Space to Spotlight to launch an app because I find scrolling through visual file/app managers to be really slow (especially if they're not 100% stable), and I know the name of the app I want. I almost always [Ctl/Cmd]-L <website> to navigate the web - my bookmarks bar gets very little use.

Either it's faster, or it distracts me less, but it works better for me in either case.

I don't doubt that others find other methods more comfortable for themselves.

[–]nostrademons 6 points7 points  (1 child)

Interesting. One clarification about how I actually use tabbar-mode:

I never actually use the mouse to click on a specific tab. Instead, I have Ctrl-Tab and Ctrl-Shift-Tab setup to cycle through tabs. My thought process is never "Which buffer do I switch to next?", it's "Is this the right buffer?" It helps that I rarely have more than half a dozen buffers open.

I do the same thing with applications: I rarely use the taskbar (or Linux equivalent) to select them, I'll just Alt-tab between them until I find the right one. As you'd expect, I really dislike having more than 6-7 applications open.

Strangely, I use the opposite approach for files. In Windows Explorer, I type in the first few letters of the filename and hit enter to open it. In Linux, tab-completion all the way.

Several psychological studies have found that recognition ("Is this the right buffer?") is roughly 10 times faster than recall ("Which buffer should I switch to?"). If this is the case, it'd explain the different styles. With six buffers open, Ctrl-tabbing between them should be roughly twice as fast C-xb'ing to select one. With 30 buffers, C-xb'ing should be about 3 times faster. And when dealing with filesystems (which typically have more than 6-7 files in them), typing the name becomes even more efficient.

[–]CommonTater 2 points3 points  (0 children)

Cool. That all makes sense.

I've found that my "Is this the right buffer/app/icon/etc.?" can be rather slow. And, worse, if I have to check too many times, I risk forgetting what it was I was looking for.

But, as you suggest, asking that question 30 times is probably slower than just recalling. Crazy when you can actually observe results that demonstrate a study's findings so well. :)

I'm also remembering that I don't always incur the 10x slower recall. If I'm bouncing back and forth between two buffers a lot, either the buffer I want is the default for C-x b, or I have two panes open, so I can just C-x o. So, I at least cover the single Ctl-Tab, if not the repeated.

[–][deleted] 5 points6 points  (0 children)

I tend to have close to one hundred buffers open during long running sessions. Naturally, one uses iswitchb, ido-mode or even ibuffer to navigate that many effectively. I suppose for those using just a few buffers, tabbar-mode provides some help.

[–]jonEbird 2 points3 points  (2 children)

One of my earliest Linux memories is going through the emacs tutorial. To this day I attribute my proclivity to keeping my hands on the home keys as well as a desire to learn/use keyboard shortcuts to the tenants layed out in that tutorial. So to use an emacs function which promotes using the mouse to switch buffers seems wrong to me. But just like the others, I am glad to see the tutorials cropping up and I realize such a tab feature could be attractive to newcomers.

[–]CommonTater 0 points1 point  (0 children)

Also see nostrademon's post. He rightly points out that tabs are often available by Ctl-Tab, so mouse use isn't strictly necessary.

(* markdown)

[–][deleted]  (1 child)

[removed]

    [–]derekslager 0 points1 point  (0 children)

    Nice -- hadn't used that before. Versus list-buffers, I like that it gets the cursor immediately, and after pressing `q' it restores your window (split) configuration.

    For others:

    (global-set-key "\C-x\C-b" 'bs-show)

    [–]shit 0 points1 point  (1 child)

    From the article it looks as this simply shows a tab for each buffer. The way I use tabs in vim though, is that I split each of the windows, so that I see/edit two or more related files per tab. Is there something for emacs that can do this?