Lorenzo Trojan
Lorenzo Trojan

Reputation: 117

emacs indentation face in command line

I'm editing python code using emacs, elpy and magit. When starting emacs using the -nw option (from bash and gnome-terminal in gnome 3). When started this way, emacs highlight the indented blocks of code using a black background single character; when using a graphic display (without the -nw option), the same character is a light gray. Please check out the two attached screenshots:

in graphical mode

in terminal

Is there a way to modify the darkness of the face in order make it less prominent?

Upvotes: 0

Views: 304

Answers (1)

Lorenzo Trojan
Lorenzo Trojan

Reputation: 117

I found a solutions that works. I'm not sure if it's the best one: if anybody knows a better way to do this, please comment!

In short:

  1. Place the cursor on the indented block;
  2. M-x customize-face;
  3. Select the default value (highlight-indentation-face);
  4. Select Show all (the face inherit from fringes);
  5. Tick Background (this will overwrite the fringe background color);
  6. Choose the white color (which is aliased to #e5e5e5)
  7. Press Apply and Save

The last step will write few lines to the ~/.emacs file (on linux) to preserve the customization values. In my system, the lines that were added are:

(custom-set-variables)
(custom-set-faces
  '(highlight-indentation-face ((t (:inherit fringe :background "white")))))

Upvotes: 1

Related Questions