<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">That did the trick, thank you Allan! <3</div>
</div>
<div name="messageSignatureSection"><br />
<div class="matchFont">Philippe</div>
</div>
<div name="messageReplySection">On Jun 26, 2019, 11:16 PM -0700, Allan Odgaard <mailinglist@textmate.org>, wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div style="font-family:sans-serif">
<div style="white-space:normal">
<p dir="auto">On 4 Mar 2019, at 11:39, Philippe Huibonhoa wrote:</p>
</div>
<div style="white-space:normal">
<blockquote style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;" class="spark_quote">
<p dir="auto">I have a command I'm trying to create that pastes multiple lines of code,<br />
the problem is sequential lines are not indented properly. […]<br />
Is there a recommended way to<br />
fix this?</p>
</blockquote>
</div>
<div style="white-space:normal">
<p dir="auto">In the bundle editor’s sidebar, set Format to Snippet (under Output).</p>
<p dir="auto">Snippet output is automatically indented to the current indent level.</p>
<p dir="auto">Be aware though that you should escape any special characters in the output that would otherwise trigger snippet functionality, in ruby that could be done with this function:</p>
<pre style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px" bgcolor="#F7F7F7"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0" bgcolor="#F7F7F7">def e_sn(str)
str.gsub(/(?=[$`\\])/, '\\')
end
</code></pre></div>
</div>
<br />
_______________________________________________<br />
textmate mailing list<br />
textmate@lists.macromates.com<br />
https://lists.macromates.com/listinfo/textmate<br /></blockquote>
</div>
</body>
</html>