5

プログラミングファイルでは、空白モードを使用してタブと長い行を強調表示します。デフォルトのハイライトは私には飾りすぎです。灰色の背景でハイライトし、フォントの通常の色を維持したいだけです。どうすれば設定できますか?

次の設定は機能しません。スナップショットの80列内の文字として、80列を超えるコードが黄色がかったように表示されるようにしたいと思います。

;; face for long lines' tails
(set-face-attribute 'whitespace-line nil
                    :background "#555"
                    :weight 'bold)

;; face for Tabs
(set-face-attribute 'whitespace-tab nil
                    :background "#555"
                    :weight 'bold)

ホワイトスペースモード

4

2 に答える 2

4

set-face-attribute指定した属性のみを変更します。

:foregroundに設定nil

(set-face-attribute 'whitespace-line nil
                    :foreground nil
                    :background "#555"
                    :weight 'bold)
于 2013-02-01T00:22:19.257 に答える
3

私にとって、不快な色は末尾の空白であることが判明し、私はこれを使用しています:

;; whitepace looks rediculous in color themes.
(defadvice color-theme-install (after my-color-theme-install-after activate)
  "Fix trailing-whitespace after color theme destroys it"
  (set-face-attribute 'trailing-whitespace nil
                      :foreground 'unspecified
                      :inverse-video 'unspecified
                      :slant 'unspecified
                      :weight 'unspecified
                      :background "#fff"))
于 2013-07-10T17:14:32.710 に答える