I am currently working with fortran and I’m adding some snippets to make the workflow faster. Since fortran does not support the ++ or – operators, I would like to make snippets that will change these operators to the explicit increment and decrement statements. For example
a++
becomes
a = a + 1
and
a--
becomes
a = a - 1
I have successfully implemented the ++ snippet as follows.
<snippet>
<content><![CDATA[ = $TM_CURRENT_WORD + 1]]></content>
<tabTrigger>++</tabTrigger>
<description>i = i + 1</description>
<scope>source.fortran</scope>
</snippet>
However, my implementation of the – snippet fails to trigger.
<snippet>
<content><![CDATA[ = $TM_CURRENT_WORD - 1]]></content>
<tabTrigger>--</tabTrigger>
<description>i = i - 1</description>
<scope>source.fortran</scope>
</snippet>
Does anyone have any suggestions on how to get the – snippet to trigger? Thanks.