How do I make Emacs show blank spaces?

pupeno picture pupeno · Nov 16, 2008 · Viewed 38.5k times · Source

How can I make Emacs show blank spaces (like a space, a tab, a line-jump, etc). Many other editors like Kate and Eclipse have this feature and I find it very useful to see when code is indent-broken because of mix of spaces and tabs (particularly Python).

Answer

Justin Tanner picture Justin Tanner · Nov 16, 2008

WhiteSpace mode is an Emacs minor mode for visualizing all white space characters in the current buffer. It can be activated with M-x whitespace-mode.

Here is a screenshot of WhiteSpace in action taken directly from the Emacs wiki,

whitespace mode in action

Note: WhiteSpaceMode has now replaced BlankMode