为Emacs添加标签tabbar功能

Emacs的强大之处在于,只有你想不到,没有她做不到!

折腾了两个小时,终于在终端putty上搞定了tabbar。下面是一些资源,以方便后面的同学快速搞定。

首先下载tabbar的插件tabbar.el,地址在:http://www.emacswiki.org/emacs/download/tabbar.el

当然网上还有叫什么tabbar_ruler的一个插件,我试着用了一下,在终端下实在不知道它有啥用。。。就果断卸载了。

 

下面是我在.emacs中tabbar的配置

(require 'tabbar)
(tabbar-mode 1)
(
global-set-key [(meta j)] 'tabbar-forward) (global-set-key [(meta k)] 'tabbar-backward) ; close default tabs,and move all files into one group (setq tabbar-buffer-list-function (lambda () (remove-if (lambda(buffer) (find (aref (buffer-name buffer) 0) " *")) (buffer-list)))) (setq tabbar-buffer-groups-function (lambda()(list "All"))) (set-face-attribute 'tabbar-button nil)

;;set tabbar's backgroud color (set-face-attribute 'tabbar-default nil :background "gray" :foreground "gray30") (set-face-attribute 'tabbar-selected nil :inherit 'tabbar-default :background "green" :box '(:line-width 3 :color "DarkGoldenrod") ) (set-face-attribute 'tabbar-unselected nil :inherit 'tabbar-default :box '(:line-width 3 :color "gray"))

;; USEFUL: set tabbar's separator gap (custom-set-variables '(tabbar-separator (quote (1.5))))

又玩到这么晚了。。。

下周末一定要12点睡!

posted @ 2013-10-27 01:34  CobbLiu  阅读(2619)  评论(0编辑  收藏  举报