rainbow-mode 用途:在特定語句或語法時,會產生顏色 安裝方法: M-x package install -> rainbow-mode 結果圖: rainbow.el 用途:在對應的delimiters會也相對應的顏色 安裝方法: MELPA 好像也有這個package,但是好像有點錯誤,不知為何無法下載,感覺像是還沒放到伺服器上。 所以,只好使用老方法下載安裝了~~ git clone https://github.com/jlr/rainbow-delimiters.git (add-to-list 'load-path "/path/to/rainbow-delimiters/") ; (require 'rainbow-delimiters) (global-rainbow-delimiters-mode) 個人感覺,原本的顏色不是很好,因此,透過rainbow-mode,稍微修改了一下rainbow-delimiter.el裡的顏色 ;;; Faces: ;; Unmatched delimiter face: (defface rainbow-delimiters-unmatched-face '((((background light)) (:foreground "#ff0000")) (((background dark)) (:foreground "#ff0000"))) "Face to highlight unmatched closing delimiters in." :group 'rainbow-delimiters-faces) ;; Faces for highlighting delimiters by nested level: (defface rainbow-delimiters-depth-1-face '((((background light)) (:foreground "#ffa500")) (((background dark)) (:foreground "#ffa500"))) "Nested delimiters face, depth 1 - outermost set." :tag "Rainbow Delimiters Depth 1 Face -- OUTERMOST" :group 'rainbow-delimiters-faces) (defface rainbow-delimiters-depth-2-face '((((background light)) (:foreground "#ffff00")) (((background dark)) (:foreground "#ffff00"))) "Nested delimiters face, depth 2." :group 'rainbow-delimiters-faces) (defface rainbow-delimiters-depth-3-face '((((background light)) (:foreground "#00ff00")) (((background dark)) (:foreground "#00ff00"))) "Nested delimiters face, depth 3." :group 'rainbow-delimiters-faces) (defface rainbow-delimiters-depth-4-face '((((background light)) (:foreground "#0000ff")) (((background dark)) (:foreground "#0000ff"))) "Nested delimiters face, depth 4." :group 'rainbow-delimiters-faces) (defface rainbow-delimiters-depth-5-face '((((background light)) (:foreground "#5600ef")) (((background dark)) (:foreground "#5600ef"))) "Nested delimiters face, depth 5." :group 'rainbow-delimiters-faces) (defface rainbow-delimiters-depth-6-face '((((background light)) (:foreground "#9400f3")) (((background dark)) (:foreground "#9400f3"))) "Nested delimiters face, depth 6." :group 'rainbow-delimiters-faces) (defface rainbow-delimiters-depth-7-face '((((background light)) (:foreground "#95ff70")) (((background dark)) (:foreground "#95ff70"))) "Nested delimiters face, depth 7." :group 'rainbow-delimiters-faces) (defface rainbow-delimiters-depth-8-face '((((background light)) (:foreground "#f0a880")) (((background dark)) (:foreground "#f0a880"))) "Nested delimiters face, depth 8." :group 'rainbow-delimiters-faces) (defface rainbow-delimiters-depth-9-face '((((background light)) (:foreground "#90ffff")) (((background dark)) (:foreground "#90ffff"))) "Nested delimiters face, depth 9." :group 'rainbow-delimiters-faces) 結果圖:
2013年10月27日 星期日
emacs rainbow-mode and rainbow.el 安裝
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言