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

Adam Sharp adsharp at me.com
Sun Dec 2 23:22:11 UTC 2012


On 02/12/2012, at 6:53 AM, Anthony V. Pulido <anthony.pulido at gmail.com> wrote:

> I've set Tab size to 1 and tried other numbers, but each time I try step 3, I receive the same result. When I try Bundle > Source > Convert Spaces to Tabs, a couple of lines where the leading spaces have been selected from step 2 are left untouched, and another line's leading spaces are simply deleted and no tabs replace them. In case, I've made sure that the leading spaces are indeed spaces, and not tabs with a size of one space.
> 
> Specifically, two lines with one leading space are left untouched, and a line with two leading spaces had its spaces deleted.

Ok, I think it will probably be easier to just do it all from the find and replace dialogue. Set up the search as before, and with regex search/replace enabled it looks like you can put \t in the replace field and hit Replace All, and TM will insert literal tabs for you.

–Adam


More information about the textmate mailing list