0

In css-mode color strings get a background color corresponding to the respective color - like this (image):

css-color-string-coloring

How to achieve this behaviour in other modes?

1

OK… wasn't aware of rainbow-mode, wich does exactly, what I intended. Of cource I found it after I posted question here ^^.

So the solution is:

M-x package-install RET rainbow-mode RET

To answer my question completely and enable it in all modes: I added

(define-globalized-minor-mode global-rainbow-mode rainbow-mode (lambda () (rainbow-mode 1)))

(global-rainbow-mode 1)

to my init file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.