Emacs, How to change some colors in M-x shell?

前端 未结 3 1709
生来不讨喜
生来不讨喜 2020-12-29 14:00

I use Emacs 24 and want to change a color of dirs and files while I\'m in shell-mode (ls command). Ideally - depending on rights of the file.

How can i

3条回答
  •  时光说笑
    2020-12-29 14:14

    Somewhere I found this, and it helped me (I'm a complete newbie, but I thought thatsetq ansi-color-names-vector would be enough):

    (setq ansi-color-names-vector
          ["black" "tomato" "PaleGreen2" "gold1"
           "DeepSkyBlue1" "MediumOrchid1" "cyan" "white"])
    (setq ansi-color-map (ansi-color-make-color-map))  ;; helped line
    

    Now ansi-color-names-vector works in shell.

提交回复
热议问题