elmarco
elmarco

Reputation: 32953

Show tabs with a different character (Emacs)

I'd be happy to have very soft character ">>" instead of white-space, like this:

Mono develop http://primates.ximian.com/~miguel/pictures/Valabinding-classpad.png

How can I achieve that in Emacs?

Upvotes: 35

Views: 21608

Answers (4)

danielpoe
danielpoe

Reputation: 3816

EDIT: Just realized that blank-mode is superseded by whitespace. Load this and customize whitespace-style to at least contain tabs and tabs-mark. I currently have:

(setq whitespace-style '(trailing tabs newline tab-mark newline-mark))

There is also blank-mode which allows you to achive what you want and it gives you some nice functions to cleanup the whitespace to your likings: http://www.emacswiki.org/emacs/BlankMode

Upvotes: 25

Jarekczek
Jarekczek

Reputation: 7866

On my Emacs version (24.3) no additional modules are needed. It's enough to launch

M-x whitespace-mode

To customize go to whitespace-style variable help,

C-h C-h v whitespace-style

This mode has many functionalities. To made it simpler one may choose not to use `Face visualization'.

Upvotes: 38

Miserable Variable
Miserable Variable

Reputation: 28752

Google search brought up show whitespace-mode. Haven't tried it myself.

Upvotes: 3

kmkaplan
kmkaplan

Reputation: 18960

Use "M-:" (M-x eval-expression) and enter the following expression:

(let ((d (make-display-table)))
  (aset d 9 (vector ?> ?>))
  (set-window-display-table nil d))

To get back to normal enter:

(set-window-display-table nil nil)

Upvotes: 7

Related Questions