Sublime Forum

How to remove first space with auto-completion?

#1

Hello to everyone,

I am using sublime text as a maths markdown tool. I’m using a lot the snippets and completion to save time.
Is there a way to remove the space before the result of the completion?
For example, I’m trying to find a way to autocomplete “rec” in “myfunction rec” to give as a result: “myfunction^{-1}”. For the moment, I can only get : “myfunction ^{-1}”.
Here “myfunction” can be any string.

I thought of using ‘\b’, but does not seem to work.

Thank you for your help

0 Likes

#2

It seems to work without problems for me with the following snippet:

<snippet>
    <content><![CDATA[^{-1}]]></content>
    <tabTrigger> rec</tabTrigger>
    <scope>text.html.markdown</scope>
    <description>^{-1}</description>
</snippet>

Note the leading space in the “tabTrigger”.

0 Likes