Emacs的color-theme插件
简介
Emacs 是一个高度可定制性的文本编辑器。
其默认的界面虽然不敢恭维,但Emacs Wiki中却有不同的主题插件(如color-theme)供用户下载。通过它们,普通用户就能为自己心爱的工具选择最适合本人操作的颜色主题,为略嫌单调的生活凭添几分色彩。
安装
和普通插件类似,记录如下:
- 在color-theme官网下载最新的插件;
- 解压后放在Emacs的加载路径下(如:'Emacs安装目录'/site-lisp);
查看
调用方法:
M-x color-theme-select <CR>
这时,Emacs会打开一个列表,在每个列表项目上输入回车(<CR>)会应用该颜色主题。用C-n和C-p在样式中游走,回车选中查看,如果选上了某个主题,按一下d,这时会出现类似
color-theme-sitaramv-nt is an interactive compiled Lisp function in `color-theme.el'.
(color-theme-sitaramv-nt)
Black foreground on white background.
Includes faces for font-lock, widget, custom, speedbar.
[back]
的内容,其中 (color-theme-sitaramv-nt) 为当前使用的主题名称。
注意:这种方法并不会更改默认主题,在下次启动后,还会恢复成默认状态。
设定默认主题
如果选中了某个主题,并希望在以后一直使用,可以在你的 ~/.emacs (Windows里面%userprofile%\Application Data\_emacs)里面加上以下内容:
;; 使用主题
;; 参考: http://www.emacswiki.org/emacs/ColorTheme
;;
(require 'color-theme)
(color-theme-initialize)
(color-theme-subtle-hacker)
这样,就可以永久应用这个颜色主题了。