7

I am trying to read the man pages in color. So far I have been using eshell and just typing man <program> However this does not use color to highlight the options etc.

I have read that M-x woman mode will render the man pages in color.

However not only does this fail to render the pages in color, usually it does not work at all or it shows the pages not in color (which is what the M-x man command does).

Is there a way to render the man pages in color?

xuhdev
  • 1,899
  • 14
  • 31
Startec
  • 1,344
  • 1
  • 13
  • 31

1 Answers1

10

Add the follows to your init file and use M-x man or the man command in eshell to view man pages: (the colors fits the wombat theme; you can change them for yourself)

(require 'man)
(set-face-attribute 'Man-overstrike nil :inherit 'bold :foreground "orange red")
(set-face-attribute 'Man-underline nil :inherit 'underline :foreground "forest green")

Or to be theme agnostic:

(require 'man)
(set-face-attribute 'Man-overstrike nil :inherit font-lock-type-face :bold t)
(set-face-attribute 'Man-underline nil :inherit font-lock-keyword-face :underline t)

screenshot

xuhdev
  • 1,899
  • 14
  • 31