質問

I currently have 2 snippets, one to wrap selection and another to replace spaces with underscore. How can I combine those two? First snippet:

<snippet>
    <content><![CDATA[ <%=t :${0:$TM_SELECTED_TEXT} %> ]]></content>
</snippet>

and second one:

<snippet>
    <content><![CDATA[${SELECTION/\s/_/g}]]></content>
</snippet>

I have two key bindings, and I only want to have one. Thanks

役に立ちましたか?

解決

Problem was with TM_SELECTED_TEXT

<snippet>
    <content><![CDATA[ <%=t :${SELECTION/\s/_/g} %> ]]></content>
</snippet>

It's working now. This snippet is useful for rails localization.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top