+2

Bug is snippets

Guido Governatori 13 years ago updated by Roman Komarov 11 years ago 1
In the following snippet I cannot move the $0 placeholder. 

<snippet>
<content><![CDATA[_${1/(.{2,})|./(?1:{)/}$1${1/(.{2,})|./(?1:})/}$0]]>
</content>
<tabTrigger>_</tabTrigger>
<scope>text.tex.latex</scope>
<description>LaTeX superscript (exp)</description>
</snippet>

The idea of the snippet is to insert a subscript in LaTeX and to had curly brackets when there are more than 2 characters. $0 moves outside the brackets or "disable" the snippet (for a single character). However, it does not move the caret outside the brackets. 

Yeah, I stumbled upon this bug too — when you have a mirrored tabstop with replacement and another tabstop right next to it, then this tabstop won't work. The only solution that I found is to insert something between them, like a space character, but that could be possible for just a few cases.