sudeepdino008
sudeepdino008

Reputation: 3364

setting font size and highlighting comments in emacs

How do I set the font size of comments in emacs. I want the comments to be smaller in size than the rest of the code. I also want it to be highlighted.

Upvotes: 1

Views: 291

Answers (1)

ataylor
ataylor

Reputation: 66099

Run M-x customize-face font-lock-comment-face and set the height attribute, along with background and foreground to how you want the comments to be highlighted.

To persist this between sessions, choose Save for future sessions from the customization screen or add this to your .emacs:

(custom-set-faces
 '(font-lock-comment-face ((t (:background "yellow" :foreground "red" :height 0.5)))))

Upvotes: 1

Related Questions