[TxMt] Re: Command that pastes in the same indent level

Philippe Huibonhoa phuibonhoa at gmail.com
Fri Jun 28 20:28:23 UTC 2019


That did the trick, thank you Allan! <3

Philippe
On Jun 26, 2019, 11:16 PM -0700, Allan Odgaard <mailinglist at textmate.org>, wrote:
> On 4 Mar 2019, at 11:39, Philippe Huibonhoa wrote:
> > I have a command I'm trying to create that pastes multiple lines of code,
> > the problem is sequential lines are not indented properly. […]
> > Is there a recommended way to
> > fix this?
> In the bundle editor’s sidebar, set Format to Snippet (under Output).
> Snippet output is automatically indented to the current indent level.
> 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:
> def e_sn(str)
>  str.gsub(/(?=[$`\\])/, '\\')
> end
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> https://lists.macromates.com/listinfo/textmate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macromates.com/textmate/attachments/20190628/e44fa0b6/attachment.html>


More information about the textmate mailing list