[TxMt] Covert tabs to spaces

Jay Soffian jay-txmt at soffian.org
Thu Apr 26 15:28:40 UTC 2007


On Apr 25, 2007, at 9:25 PM, Daryl Spitzer wrote:

> See "Tabs and Spaces" in http://macromates.com/wiki/Tutorials/ 
> BasicsTest.

As well, I have in my personal bundle:

Tabify

Save: Nothing
Command(s):
   perl -pe 's{^( *)}{ "\t" x (length($1) / $ENV{TM_TAB_SIZE}) }e'
Input: Selected Text or Document
Output: Replace Selected Text

Untabify

Save: Nothing
Command(s):
   perl -pe 's{^(\t*)}{ " " x (length($1) * $ENV{TM_TAB_SIZE}) }e'
Input: Selected Text or Document
Output: Replace Selected Text




More information about the textmate mailing list