On 22 Aug 2016, at 12:48, Fabian Zeindl wrote:

That is the weird thing: My command (running from the Macro):

TextMate doesn’t run the indent algorithm on the output but simply indent it to the “current level”.

So #2 is what you want, but you want to replace ^ with \t to increase the indent by one for all but the last line.

At least I think that should work…