Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs equivalent of vim's bg=dark? (setting background to dark)

Tags:

In vim, I can run set bg=dark and then vim will adjust all syntax highlighting to work on a terminal with a dark background (whether or not the background actually is dark, vim will assume that it is).

How do I tell emacs to assume that the background is either dark or light?

like image 288
Alexander Bird Avatar asked Feb 05 '10 02:02

Alexander Bird


3 Answers

I've used the invert-face function in the past:

(invert-face 'default)

Or:

M-x invert-face <RET> default

like image 169
pheaver Avatar answered Sep 30 '22 14:09

pheaver


I think the best approach to use is to use ColorTheme. Other options to customize the frame colors you can find here. I can't think about a single command, however you can start emacs with --reverse-video.

like image 22
danielpoe Avatar answered Sep 30 '22 16:09

danielpoe


M-x set-variable <RET> frame-background-mode <RET> dark

see also the bottom of https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Faces.html

like image 33
Alexander Bird Avatar answered Sep 30 '22 15:09

Alexander Bird