如何在Eshell中突出显示一些单词?

时间:2019-03-30 01:00:19

标签: emacs eshell

我在Emacs中使用Eshell运行程序,可以在Shell中检查输出,但是我想突出显示诸如“错误”,“信息”之类的词,或者诸如此类的词。我该怎么办?

2 个答案:

答案 0 :(得分:0)

(defun font-lock-comment-annotations ()
  (font-lock-add-keywords
   nil
   '(("\\<\\(error\\)" 1 font-lock-warning-face t)
     ("\\<\\(info\\)" 1 'org-todo t)
   ))
(add-hook 'eshell-mode-hook 'font-lock-comment-annotations)

试试看:)

答案 1 :(得分:0)

您应该这样尝试nschum/highlight-symbol.el

highlight