[TxMt] Re: Replace spaces with tabs at beginning of line

Adam Sharp adsharp at me.com
Wed Nov 28 23:01:59 UTC 2012


Hi Anthony,

1. Perform a search for this regex: '^ +' (minus quotes)
2. Close the search, place the caret anywhere in the file, and type Opt-Cmd-F
3. Bundle > Source > Convert Spaces to Tabs (make sure to set up your spaces per tab correctly first, so TM converts to the correct number of tabs)

Regards,

Adam

On 29/11/2012, at 9:48 AM, Anthony V. Pulido <anthony.pulido at gmail.com> wrote:

> Hello everyone,
> 
> I have a text file that is indented properly, but instead of tabs, the indentation has been done with spaces. Is it possible to replace the spaces with tabs only at the beginning of the line?
> 
> In this case, 1 space -> 1 tab.
> 
> Thanks!
> 
> Anthony
> 
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate



More information about the textmate mailing list