[TxMt] Elastic tabstops

Drew McLellan lists at allinthehead.com
Tue Jul 4 09:41:25 UTC 2006


On 4 Jul 2006, at 08:09, Allan Odgaard wrote:

> On 4/7/2006, at 8:58, Christian Bogen wrote:
>
>> [...] The idea sounds quite interesting IMHO. Any chances to see  
>> something like this in a future TextMate release? :)
>
> I got a few personal emails about it and one ticket request :)
>
> Here’s my canned reply:
>
> Indeed it is interesting. I do think there would be too big a  
> compatibility problem with actually saving such files, since all  
> renderings of the file (cat it in terminal, paste it in an email,  
> on the web, etc.) would be wrong -- and it’s not easily fixable,  
> e.g. by piping the text through something like expand, which would  
> normally fix presenting a file with the wrong tab size.
>
> But the actual editing mode might be useful to have. I’ll need to  
> give it some further thoughts.

I'd like to see this as an editing mode, automatically managing real  
tabs/spaces for me.

I use tabs for aligning assignment blocks, and so often find myself  
going back up to add extra tabs when the left side of the assignments  
becomes longer than I expected. Example (using 4 spaces for a tab here):

$a    = 'A';
$bb   = 'B';
$ccc  = 'C';

If I were to enter a forth line with a really long variable name, I'd  
*love* for the behaviour to be result in:

$a                = 'A';
$bb               = 'B';
$ccc              = 'C';
$really_long_name = 'foo';

.. but for that to be done with real tabs. I think the suggested  
convention of using a blank line to clear the alignment is a good one.

Not sure if that's useful input or not, but there you have it :)

drew.


More information about the textmate mailing list