Emacs 增添标签栏

Emacs 默认没有标签栏,使用 tabbar 这个扩展可以给emacs添加标签栏。参见王垠所写的 emacs elisp 扩展中关于 tabbar.el 的部分或 tabbar mode on Emacs Wiki 。

    在 debian/ubuntu 下,包 emacs-goodies-el 即包含众多好用的 emacs 扩展,也包括 tabbar。安装好tabbar后,默认的外观比较素,可通过设置 tabbar-button, tabbar-selected, tabbar-highlight, tabbar-separator (具体各部分的名字可参考 tabbar.el 源文件) 等部分定制tabbar的外观,以配合 color-theme 的外观风格。我在 .emacs 中通过:

01;;;; 设置tabbar外观
02;; 设置默认主题: 字体, 背景和前景颜色,大小
03(set-face-attribute 'tabbar-default nil
04                    :family "Vera Sans YuanTi Mono"
05                    :background "gray80"
06                    :foreground "gray30"
07                    :height 1.0
08                    )
09;; 设置左边按钮外观:外框框边大小和颜色
10(set-face-attribute 'tabbar-button nil
11                    :inherit 'tabbar-default
12                    :box '(:line-width 1 :color "gray30")
13                    )
14;; 设置当前tab外观:颜色,字体,外框大小和颜色
15(set-face-attribute 'tabbar-selected nil
16                    :inherit 'tabbar-default
17                    :foreground "DarkGreen"
18                    :background "LightGoldenrod"
19                    :box '(:line-width 2 :color "DarkGoldenrod")
20                    ;; :overline "black"
21                    ;; :underline "black"
22                    :weight 'bold
23                    )
24;; 设置非当前tab外观:外框大小和颜色
25(set-face-attribute 'tabbar-unselected nil
26                    :inherit 'tabbar-default
27                    :box '(:line-width 2 :color "gray70")
28                    )

定制其外观。在 emacs-snapshot 中得到的效果如下:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值