문제

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