Ads by Google

Wednesday, November 14, 2007

Showing tabs

Without going into the debates of whether tabs are evil and what not, here's a simple way to visually see tabs in as you traverse text in a buffer.

(setq x-stretch-cursor t)
Documentation:
*Non-nil means draw block cursor as wide as the glyph under it.
For example, if a block cursor is over a tab, it will be drawn as
wide as that tab on the display.


Plug that into your .emacs and you should see a block cursor when emacs encounters a tab. I like this setting, as it's unobtrusive and shows up only when required.

Sure, there's M-x untabify and BlankMode but I prefer this as I scroll through the code quite slowly.