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

Adam Sharp adsharp at me.com
Fri Dec 7 06:21:44 UTC 2012


On 07/12/2012, at 4:27 AM, Anthony V. Pulido <anthony.pulido at gmail.com> wrote:

> Would anyone know how to fix this so that 1 leading space -> 1 tab?

Strange, I responded to this, but it isn't showing up in the archives and you clearly never saw it. Quoted below.

–Adam

Begin forwarded message:

> From: Adam Sharp <adsharp at me.com>
> Subject: Re: [TxMt] Replace spaces with tabs at beginning of line
> Date: 3 December 2012 1:16:38 PM AEDT
> To: TextMate users <textmate at lists.macromates.com>
> 
> On 03/12/2012, at 12:32 PM, Anthony V. Pulido <anthony.pulido at gmail.com> wrote:
> 
>> I just tried that and it is replacing spaces with tabs now, but it replaces all leading spaces with one tab. I tried it on a line with 19 leading spaces, all of which were replaced with one tab. I have set the tab size to 1, 2, 3, etc., without any change in the outcome.
> 
> Ah, of course. Tested it myself this time, and what you need to do is steps 1 and 2 (so you have a document with all leading spaces selected). Then, perform a new find and replace *in the current selection* which replaces a single space with a single tab.
> 
> –Adam



More information about the textmate mailing list