1

テキストモードで単語を別の顔でレンダリングする方法はありますか?

4

2 に答える 2

5

「highlight-regexp」を調べてください。顔を変更したい単語を入力するだけです (ただし、任意の正規表現を使用できます)。

M-xハイライト正規表現

highlight-regexp is an alias for `hi-lock-face-buffer' in
`hi-lock.el'.

It is bound to M-s h r.

(highlight-regexp regexp &optional face)

Set face of each match of regexp to face.

Interactively, prompt for regexp then face.  Buffer-local history
list maintained for regexps, global history maintained for faces.
Use M-p to retrieve previous history items,
and M-n to retrieve default values.
于 2009-11-05T19:32:11.547 に答える
1

はい、

あなたが望むのは font-lock-mode です。

ここを参照してください: http://www.gnu.org/software/emacs/manual/html_node/emacs/Font-Lock.html

具体的には、 をオンにしてfont-lock-modeから、 を介してキーワードのリストを指定しますfont-lock-add-keywords

于 2009-11-05T19:23:58.583 に答える