让一切变得更加彩色

时间:2013-10-26 00:13:22

标签: emacs syntax-highlighting font-lock

我可以在emacs中添加尽可能多的模式,包括粗体和斜体吗?

3 个答案:

答案 0 :(得分:1)

除了使用color or custom themes之外,正如@Link所提到的,一些模式提供了多种级别的语法高亮(称为字体锁定)。请参阅用户选项font-lock-maximum-decoration

一些第三方库专门添加了更多突出显示,有时通过添加更多字体锁定级别。一个很好的例子是库Dired+,它提供了更多的突出显示,并且比突出显示的Dired模式更能控制突出显示。

答案 1 :(得分:0)

也许您正在寻找colour or custom themes?我不确定你是否可以做粗体或斜体,但我很确定可能有一个插件。

答案 2 :(得分:0)

这源于一个流行的暮光主题,可以插入到您的.emacs文件中,然后以您认为合适的任何方式进行修改:

(set-mouse-color "sienna1")

(set-cursor-color "#DDDD00")

(custom-set-faces
  '(default ((t (:background "#141414" :foreground "#CACACA"))))
  '(blue ((t (:foreground "blue"))))
  '(border-glyph ((t (nil))))
  '(buffers-tab ((t (:background "#141414" :foreground "#CACACA"))))
  '(font-lock-builtin-face ((t (:foreground "#CACACA"))))
  '(font-lock-comment-face ((t (:foreground "#5F5A60"))))
  '(font-lock-constant-face ((t (:foreground "#CF6A4C"))))
  '(font-lock-doc-string-face ((t (:foreground "DarkOrange"))))
  '(font-lock-function-name-face ((t (:foreground "#9B703F"))))
  '(font-lock-keyword-face ((t (:foreground "#CDA869"))))
  '(font-lock-preprocessor-face ((t (:foreground "Aquamarine"))))
  '(font-lock-reference-face ((t (:foreground "SlateBlue"))))
  '(ruby-string-delimiter-face ((t (:foreground "#5A6340"))))
  '(ruby-regexp-delimiter-face ((t (:foreground "orange"))))
  '(ruby-heredoc-delimiter-face ((t (:foreground "#9B859D"))))
  '(ruby-op-face ((t (:foreground "#CDA869"))))
  '(font-lock-regexp-grouping-backslash ((t (:foreground "#E9C062"))))
  '(font-lock-regexp-grouping-construct ((t (:foreground "red"))))
  '(minibuffer-prompt ((t (:foreground "#5F5A60"))))
  '(ido-subdir ((t (:foreground "#CF6A4C"))))
  '(ido-first-match ((t (:foreground "#8F9D6A"))))
  '(ido-only-match ((t (:foreground "#8F9D6A"))))
  '(mumamo-background-chunk-submode ((t (:background "#222222"))))
  '(linum ((t (:background "#141314" :foreground "#2D2B2E"))))
  '(hl-line ((t (:background "#212121"))))
  '(region ((t (:background "#373446"))))
  '(yas/field-highlight-face ((t (:background "#27292A"))))
  '(mode-line ((t (:background "grey75" :foreground "black" :height 0.8))))
  '(mode-line-inactive ((t (:background "grey10" :foreground "grey40" :box (:line-width -1 :color "grey20") :height 0.8))))
  '(magit-item-highlight ((t (:background "#191930"))))
  '(magit-diff-add ((((class color) (background dark)) (:foreground "green"))))
  '(org-hide ((((background dark)) (:foreground "#141414"))))
  '(outline-4 ((t (:foreground "#8F8A80"))))
  '(diff-removed ((((class color) (background dark)) (:foreground "orange"))))
  '(diff-added ((((class color) (background dark)) (:foreground "green"))))
  '(font-lock-string-face ((t (:foreground "#8F9D6A"))))
  '(font-lock-type-face ((t (:foreground "#9B703F"))))
  '(font-lock-variable-name-face ((t (:foreground "#7587A6"))))
  '(font-lock-warning-face ((t (:background "#EE799F" :foreground "red"))))
  '(gui-element ((t (:background "#D4D0C8" :foreground "black"))))
  '(region ((t (:background "#27292A"))))
  '(highlight ((t (:background "#111111"))))
  '(highline-face ((t (:background "SeaGreen"))))
  '(left-margin ((t (nil))))
  '(text-cursor ((t (:background "yellow" :foreground "black"))))
  '(toolbar ((t (nil))))
  '(underline ((nil (:underline nil))))
  '(zmacs-region ((t (:background "snow" :foreground "blue"))))
  )