[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: show tabs and white space
From: |
rgb |
Subject: |
Re: show tabs and white space |
Date: |
14 Apr 2005 14:34:27 -0700 |
User-agent: |
G2/0.2 |
mgrd wrote:
> For editing a Makefile I need to display/show the tabs and white
spaces
> within it.
>
> Does anybody know how to obtain this?
>
If you want to be able to spot the difference between a tab
and a space character you could highlight tabs like this.
(defface tab-face '((t (:background "red")))
"highlight tabs")
(font-lock-add-keywords 'tacl-mode '(("\t" 0 tab-face prepend)))
;; ^^^ substitute your mode name here
;; spaces can be highlighted too if you really want.
(defface space-face '((t (:background "grey" )))
"highlight whitespace")
(font-lock-add-keywords 'tacl-mode '((" " 0 space-face prepend)))
;; ^^^ substitute your mode name here
If you only want to see trailing whitespace I use this
(defun stw () "Toggles `show-trailing-whitespace' on/off"
(interactive)
(setq show-trailing-whitespace (not show-trailing-whitespace)))