Changing highlight line color in emacs

前端 未结 2 1151
走了就别回头了
走了就别回头了 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:34

    M-x customize-face RET hl-line will help you. Just pick a face you like (you can type the same command with the other theme installed, just to peek the values you like).

    0 讨论(0)
  • 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)
    
    0 讨论(0)
提交回复
热议问题