KeyC0de
KeyC0de

Reputation: 5257

How to change colors for syntax highlighting on Emacs (GUI / Terminal )?

How can i change syntax highlighting colors for the emacs program? The relevant question "Change Emacs syntax highlighting colors" doesn't help me. Perhaps it is either obsolete, incomplete, or simply assumes too much. Is there a tutorial for this somewhere? Thanks in advance.

Upvotes: 1

Views: 1216

Answers (1)

Drew
Drew

Reputation: 30701

You want to customize individual faces (or a theme, if you are using one).

Use M-x customize-face.

Use C-u C-x = to find out which faces are used at the cursor position (point).

Use M-x list-faces-display to see what all the faces look like.

For font-lock (the default syntax highlighting mechanism), see the faces whose names begin with font-lock-:

font-lock-builtin-face
font-lock-comment-delimiter-face
font-lock-comment-face
font-lock-constant-face
font-lock-doc-face
font-lock-function-name-face
font-lock-keyword-face
font-lock-negation-char-face
font-lock-preprocessor-face
font-lock-regexp-grouping-backslash
font-lock-regexp-grouping-construct
font-lock-string-face
font-lock-type-face
font-lock-variable-name-face
font-lock-warning-face

Upvotes: 6

Related Questions