Changing highlight line color in emacs

前端 未结 2 1150
走了就别回头了
走了就别回头了 2021-01-31 17:09

I installed emacs 24 and also installed prelude and I wanted to change the theme from zenburn to tango-dark. But the color that the line is highlighted is yellow and I don\'t li

2条回答
  •  囚心锁ツ
    2021-01-31 17:37

    That would be an easy fix if you customize your init file (~/.emacs, ~/.emacs.el, or ~/.emacs.d/init.el)

    Turn on hl-line:

    (global-hl-line-mode 1)
    

    Set any color as the background face of the current line:

    (set-face-background 'hl-line "#3e4446")
    

    To keep syntax highlighting in the current line:

    (set-face-foreground 'highlight nil)
    

提交回复
热议问题