1

I'd like the mode-line to show names of all opened files (maybe truncated if too long), similar to browser tabs.

I'd like to have this because I have 2 shortcuts for switching to prev/next user buffer, and it would be more convenient if I know the list of opened files (without typing C-x b).

Is there any package available to do that?

AhLeung
  • 207
  • 1
  • 5
  • You need to be careful about loading up the mode-line with too much stuff because it will reduce performance -- especially when holding down a key that will be repeated (e.g., moving with the arrow) or when typing quickly (e.g., I type 100 wpm, but that's secretarial not programming). I added exceptions in my own custom setup to use a previously recorded value (for time consuming stuff in the mode-line) if the last command is the same as the current command so that recalculation is not needed. I think you'll find that you will always have too many open buffers to put them in the mode-line. – lawlist May 11 '16 at 08:54
  • There are lots of other things already invented to see the open buffers -- e.g., in the menu-bar, in a pop-up mouse context menu, tab-completion of buffers that are already open, etc. – lawlist May 11 '16 at 08:59
  • Thanks for the advice! How about showing the list in minibuffer? – AhLeung May 11 '16 at 16:31
  • 3
    Look at tabbar mode (https://www.emacswiki.org/emacs/TabBarMode). It uses the header line, which is very similar to the mode line except it appears at the top of the window and is generally unused. I tried it years ago, and ultimately abandoned it in favor of `ido` and `ibuffer`, which scale much, much better with a large number of buffers than any sort of tabbar. – jpkotta May 11 '16 at 16:49
  • 1
    AnLeung: If you use `ido-mode` then I think `M-x ido-switch-buffer` is a bit similar to what you're asking for, using the minibuffer. – phils May 11 '16 at 20:43

0 Answers0