[TxMt] Re: Indent size different from tab size

Jacob Rus jrus at hcs.harvard.edu
Sat Oct 28 06:45:50 UTC 2006


James Milne wrote:
> I am working a lot with source code written using Emacs on Linux. The 
> prevailing convention is that tabs are presented as 8 spaces, but 
> indents are only 4 spaces. Indenting will insert spaces, and Emacs seems 
> to swap groups of 8 spaces for a tab.
> 
> If I use a tab size of 8 in Textmate, the source files display 
> correctly. Sadly, there is no way to tell Textmate to use an indent size 
> of 4.
> 
> It would be very useful is it was possible to tell TextMate to:
> 1. Draw tabs as 8 spaces
> 2. Use spaces when indenting
> 3. Intend with 4 spaces, not the 8 spaces from a tab
> 
> Is there any way to do this with TextMate at the moment?

No there isn't.  And this is a truly wacky convention from emacs?  Is 
that really the default in emacs?? I suggest that instead you just make 
some simple commands for converting sane indentation <-> wacky emacs 
indentation, and then just run them when you open/save documents. 
Sorry, but there really is no better way to do this at the moment.

Incidentally, is there any possible explanation for this behavior in 
emacs?  Why use tab characters at all if the intention is to have 
4-space indents?  Just to save a few bytes of disk space??

-Jacob




More information about the textmate mailing list