Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can TextMate show tab vs space characters?

Tags:

textmate

Using TextMate on Mac, the "invisibles" can be displayed by using

View -> Show Invisibles

But the space vs tab characters are not shown, and Preferences doesn't seem to have any entry to change that either. Is there a way to show them? It is because some older coder may have tab or space mixed together so what looks good in the editor may actually be misaligned. (editor shows tab as 2 spaces)

like image 922
nonopolarity Avatar asked Aug 03 '10 19:08

nonopolarity


2 Answers

Tab characters are shown, but spaces are not. What's probably happening is that you have Soft tabs turned on, in which case the tabs are converted into spaces automatically.

alt text http://grab.by/grabs/fabaea391dc8bc764636f0ca19a8c38d.png

In this picture there is a tab character, new line, tab character, new line, soft tab, new line

See this thread for an explanation as to why spaces are not shown.

Here is where you can change soft/real tabs. alt text http://grab.by/grabs/783db3a88609a01c7702cbd250f495c6.png

like image 128
I82Much Avatar answered Oct 31 '22 21:10

I82Much


If "Show invisibles" is activated, you will see a little triangle for each tab, which points to the right. Spaces are not shown at all, you can only see them indirectly, i.e. via the symbol which represents the line break. If the line break isn't the first character after your code of that line, there are spaces in between.

So to make a long answer short: You should already see tabs, however the symbols representing the invisibles are sometimes hard to see.

like image 22
Florian Pilz Avatar answered Oct 31 '22 21:10

Florian Pilz