Reputation: 23
Really new programming student here, and I'm trying to get tabs in emacs (browser style, like Aquamacs has).
So, how do you get tabs in emacs? A strip of labels showing me which buffers I have open, and clicking on one of them selects that buffer.
I have googled this extensively, but not being fluent in elisp makes it really hard to understand. I have installed the tabbar package, but I do not know where to go from here.
What do I want? Just tabs, and a command to open new tabs, for example C-t (or whatever is best).
Upvotes: 2
Views: 645
Reputation: 912
As the other answers, tabbar
is what you're looking for.
You need to copy it to wherever you keep your emacs files (if you don't have such a place - make one, tabbar
will not be the last add-on you'll use :) ), load the file and start the tabbar-mode
.
In the below code, the emacs files dir is .emacs.files and it is in my home dir.
(setq tabbar-file
(expand-file-name "tabbar.el"
(expand-file-name ".emacs.files" "~")))
(load-file tabbar-file)
(tabbar-mode 1)
(define-key global-map "\M-[" 'tabbar-backward)
(define-key global-map "\M-]" 'tabbar-forward)
In the above code, I also added binding of scrolling through the tabs to Alt-[ and Alt-].
As to opening new tabs - every time you'll open a new file, it will be opened in a new tab, so don't worry...
Upvotes: 0
Reputation: 73365
I have installed the tabbar package, but I do not know where to go from here.
The tabbar
library provides a global minor mode named tabbar-mode
, so you will want to enable that in your init file. If it's installed somewhere in your load-path
then the following will work:
(when (require 'tabbar nil t)
(tabbar-mode 1))
There is lots of documentation in the library's Commentary, which you can visit like so:
M-x find-library
RET tabbar
RET
Upvotes: 1