I wrote a snippet for Sublime text that does the following:



and puts the cursor between them. Which works fine. However, if I want to use TAB inside the environment - lets say I want to complete enum - the cursor moves to the line after \end{lemma} and I end up with this


the cursor is here now.

Is there a way to fix this behaviour?

This is the snippet

<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
| improve this question | | | | |
  • 1
    It would be useful to add your snippet. I assume you use a $1 inside your lemma. You can change it to $0 to end the snippet inside the environment instead of having a field inside and end it after the environment. – r-stein Dec 17 '16 at 10:27
  • @r-stein yes you are right I'm using $1. I edited the question to include the snippet. – adham Dec 18 '16 at 16:29
  • if you are using latextools package in sublime and type begin there is already a similar snippet – gtatr Dec 18 '16 at 16:42