Emacs Init: Whitespace Mode
whitespace-mode Config
You can setup whitespace-mode to use a simple color scheme.

whitespace-mode
.
Download sample test file: whitespace_sample_file.txt
For a simple and clean whitespace mode setup, put the following in your emacs init.
(progn ;; Make whitespace-mode with very basic background coloring for whitespaces. ;; http://xahlee.info/emacs/emacs/whitespace-mode.html (setq whitespace-style (quote (face spaces tabs newline space-mark tab-mark newline-mark ))) ;; Make whitespace-mode and whitespace-newline-mode use “¶” for end of line char and “▷” for tab. (setq whitespace-display-mappings ;; all numbers are unicode codepoint in decimal. e.g. (insert-char 182 1) '( (space-mark 32 [183] [46]) ; SPACE 32 「 」, 183 MIDDLE DOT 「·」, 46 FULL STOP 「.」 (newline-mark 10 [182 10]) ; LINE FEED, (tab-mark 9 [9655 9] [92 9]) ; tab )))
In the above, the numbers are Unicode codepoint in decimal. Depending on your choice of font, some glyphs may not show up or correctly. If so, you can try the following glyphs.
char | codepoint (decimal) | name |
---|---|---|
· | 183 | MIDDLE DOT |
¶ | 182 | PILCROW SIGN |
↵ | 8629 | DOWNWARDS ARROW WITH CORNER LEFTWARDS |
↩ | 8617 | LEFTWARDS ARROW WITH HOOK |
⏎ | 9166 | RETURN SYMBOL |
▷ | 9655 | WHITE RIGHT POINTING TRIANGLE |
▶ | 9654 | BLACK RIGHT-POINTING TRIANGLE |
→ | 8594 | RIGHTWARDS ARROW |
↦ | 8614 | RIGHTWARDS ARROW FROM BAR |
⇥ | 8677 | RIGHTWARDS ARROW TO BAR |
⇨ | 8680 | RIGHTWARDS WHITE ARROW |
[see ASCII Character Symbols ␀ ␣ ¶]