Emacs中的Color Theme以及字型設定

來源:互聯網
上載者:User

先上一張:

 

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.