[TxMt] spaces and tabs and reformatting

Scott Haneda talklists at newgeo.com
Mon Aug 31 02:16:46 UTC 2009


If I have for example this code:
function foo() {
     var list = [];
}

Note there is 4 spaces indention.

I work in 5 spaces soft tabs.

If I move the cursor to just before the "v" in "var", and left arrow,  
I move to the left one space.  Somehow, I need to reformat this code  
to be 5 spaces.  Then when I move the arrow to the left, it moves 5  
spaces, or one apparent tab stop.

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.

I end up re-tabbing all the code, which is a tedious process.

I I just add one space, or select the 4 spaces and replace with a tab,  
I get the functionality I want:
function foo() {
      var list = [];
}

That example, the space before the "v" becomes a tab, either hard or  
soft.
Thanks.
-- 
Scott * If you contact me off list replace talklists@ with scott@ *




More information about the textmate mailing list