[TxMt] Re: spaces and tabs and reformatting

Scott Haneda talklists at newgeo.com
Mon Aug 31 03:25:54 UTC 2009

On Aug 30, 2009, at 7:23 PM, Adam Bryzak <adam+textmate at bryzak.net>  

> On 31/08/2009, at 12:16 PM, Scott Haneda wrote:
>> If I have for example this code:
>> function foo() {
>>    var list = [];
>> }
>> Note there is 4 spaces indention.
>> I work in 5 spaces soft tabs.
>> <snip>
>> I have tried selecting the code, while I have my tabs set to 5, hard
>> or soft, using reformat selection, in this case, in the JavaScript
>> bundle area, or, convert spaces to tabs.  Neither gets me where I  
>> need
>> to be.
> When I change a file that has a different tab stop to what I usually
> work in, I usually reformat it by setting my tab width to match the
> file, convert spaces to tabs, change the tab width to be my preferred
> one then convert tabs to spaces.

Any way to automate that on a selection? I don't suppose I can access  
the current tab stop setting value.

Any fancy regex's that could find and replace this? It's generally  
going to be 1-4 leading spaces, which should not be to hard to fish out.

Iphone says hello.

More information about the textmate mailing list