[TxMt] Mixed mode indentation

Trevor Harmon trevor at vocaro.com
Sun Dec 17 20:21:07 UTC 2006


I'm working with an open-source Java project that uses the so-called  
"mixed" mode for indentation. This is the convention popularized by  
Emacs where indentations are (say) 4 spaces but tab characters expand  
to 8 spaces. Unfortunately, TextMate does not support this mode, as  
discussed previously [1]. There is a script that converts between  
mixed mode, but it appears to be manual [2], which won't work in my  
case. (I'd have to run the conversion every time I open and save a  
file.)

So, I need a better solution to get around TextMate's lack of support  
for mixed mode. I was thinking about submitting a patch upstream that  
would simply get rid of mixed mode and instead use Java's standard  
convention [3], but then I noticed that it apparently recommends  
mixed mode!

"Four spaces should be used as the unit of indentation. The exact  
construction of the indentation (spaces vs. tabs) is unspecified.  
Tabs must be set exactly every 8 spaces (not 4)."

Am I reading that right? Does Java's coding standard recommend mixed  
mode indentation? What are TextMate users to do in this situation?

Trevor

[1] http://comox.textdrive.com/pipermail/textmate/2004-December/ 
002053.html
[2] http://comox.textdrive.com/pipermail/textmate/2006-November/ 
015565.html
[3] http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20061217/fcd17274/attachment.html>


More information about the textmate mailing list