Emacs 24 設定theme

來源:互聯網
上載者:User

升級到Emacs24.2後,以前的theme安裝方式可以不用了。因為Emacs24 內建了幾種theme,如果不夠的話,還可以用package system來選擇。

首先修改~/.emacs.d目錄的許可權,

chown -R dean:dean .emacs.d

然後啟動emacs24,建立.emacs.d/init.el檔案,添加package system資訊:

(when (>= emacs-major-version 24)  (require 'package)  (package-initialize)  (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)  )

重新啟動emacs。

這時你可以運行命令list-packages,然後出現所有可以使用的packages。

不過我這裡只關心theme,所以選中color-theme, 用i鍵,然後用x鍵安裝之。

運行命令:

color-theme-select, 這時會出現列表,按個選中,Eamcs會自動切換主題,選擇自己想要的吧。

我選擇了Comidia,因為我喜歡狀態列上的廋字型。在init.el中添加幾行:

(require 'color-theme)(setq color-theme-is-global t)(color-theme-initialize)(color-theme-comidia)

重啟Emacs即可。在Windows上面操作相同。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.