先上一張:
Color Theme用的是gnome2, 字型用的是Visual Studio內建的Consolas。我使用的環境是Windows+Cygwin+Emacs23.2。
1,安裝Color Theme外掛程式
首先,從http://download.savannah.gnu.org/releases/color-theme/下載color theme 6.6.0版本。
接著將color-theme-6.6.0.tar.gz解壓到~/.emacs.d/plugins/檔案夾
將下面的代碼貼到.emacs檔案中:
;;;Color Theme
(add-to-list 'load-path "~/.emacs.d/plugins/color-theme-6.6.0")
(require 'color-theme)
(color-theme-initialize)
(color-theme-gnome2)
重新啟動Emacs, 你會發現Color Theme 起作用了,介面的顏色發生的變化。你可以使用如下命令來查看當前可用的Themes:
color-theme-select
將游標移動到相應的ColorTheme上,斷行符號就可以預覽該Theme。如果選中哪個Theme,將其寫入.emacs檔案,以便下次Emacs在啟動時便應用該Theme。
所有的ColorTheme的定義儲存在~/.emacs.d/plugins/color-theme-6.6.0/themes/color-theme-library.el檔案中,你可以在此處添加自訂Theme(即一個Lisp函數)。
2,更改Emacs使用的字型
將下面的兩行加到.emacs設定檔中。
;;set font family
(set-default-font "-outline-consolas-normal-r-normal-normal-14-97-96-96-c-*-iso8859-1")
整個配置部分如下所示:
至此,所有工作都做完了。運行emacs,這時你就會看到你的Emacs變得帥帥的了。
reference:
http://www.emacswiki.org/emacs/ColorTheme