Question

I have search the web. I have tried color-theme (perhaps I need to create my own, but really I have my emacs set up the way I want it except for this ONE thing, and I could not find a color theme that was acceptable to me).

I just want to change the color of the directories in dired-mode. I have several custom colors changed in my .emacs, like:

(set-face-foreground 'font-lock-comment-face "yellow" )

But I just don't know what face to change for the directories in dired mode.

Can anyone help?

Thanks!

Was it helpful?

Solution

If you move point to the place that's displaying the color you want to change and run M-x describe-face, it will tell you the face for the text at point and that face's properties.

For me, it's dired-directory, not font-lock-comment-face.

OTHER TIPS

Well, I managed to list the faces by doing M-x list-faces-display, and then I found the faces that had the dark blue that I didn't want, and, although none of the face descriptions said anything remotely like "Directory Name in dired", I just changed all of the faces that had unreadable colors, and my problems were solved!

(set-face-foreground 'dired-directory "yellow" )

The easiest way is to run:

M-x customize-face dired-directory

You'll then be presented with a menu of attributes you can customize. Select Save for future sessions and your .emacs will automatically be updated to make the change permanent.

diredful (dired colorful) worked for me.

https://www.emacswiki.org/emacs/Diredful

https://github.com/emacsmirror/diredful

To match directories:

  1. Pattern: d.*
  2. Select regexp on whole line (so it matches the permissions containing the 'd')
  3. Check apply to Dirctories
  4. Style the colors.

if you are using an older version of emacs (i tested emacs 21) try "list-text-properties-at" instead of "describe-face". for me, it shows the directory face as "font-lock-function-name-face".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top