配置Emacs的Color Themes

来源:互联网 发布:mac系统终端进入mysql 编辑:程序博客网 时间:2024/05/21 17:13
首先下载color-theme.el(在goole或百度里可以搜到),然后把它放在加载路径里,最后在~/.emacs里加上

;;set color
(add-to-list 'load-path "~/emacs/site/color-theme")
(reqiure 'color-theme)
(color-theme-initialize)

重启Emacs,就可以用M-x color-theme-select(或者Tools--Color Themes)来选择喜欢的颜色主题了,它会打开一个列表,在每个列表项目上回车就会应用那个颜色主题,如果选上了某个主题,按一下d会出现类似:

color-theme-sitaramv-solaris is an interactive Lisp function in `c:/usr/eshome/emacs/site/color-theme/themes/color-theme-library.el'.
(color-theme-sitaramv-solaris)
White on a midnight blue background.  Lots of yellow and orange.
Includes faces for font-lock, widget, custom, speedbar, message, gnus,
eshell.

把其中的黑体语句加到~/.emacs文件中就可以在每次打开Emacs时自动应用这个颜色主题.