簡體   English   中英

如何突出Eshell中的一些單詞?

[英]How to highlight some words in Eshell?

我在Emacs中使用Eshell來運行程序,我可以檢查Shell中的輸出,但是我想突出顯示一些詞語,例如'errors''info',或者其他類似的詞。 我怎么能這樣做?

(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)

試試看 :)

您應該嘗試使用nschum / highlight-symbol.el ,如下所示:

突出

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM