There is a package called Scope Hunter , Isaac Muse , which is really useful for this.
It can display the scope under any cursor in the document, which I found very useful in debugging my own fragments. Sometimes it is very detailed; sample area from my first document:
Scope: text.tex.latex meta.function.environment.list.latex meta.function.environment.general.latex meta.function.environment.math.latex string.other.math.block.environment.latex meta.group.braces.tex meta.space-after-command.latex
(Wrapped for readability)
I would not be able to find this if I spent a week choosing SL2, but this package gets it in seconds. Highly recommended.
This level of detail also means that you can define fragments in a very granular way if you want. For example, meta.function.environment.list.latex generally matches lists in LaTeX, so I have a snippet that inserts a new \item when I press super + enter in the list environment, but no one else. I can orient fragments much more efficiently than blind guesses.
The source code on Github , or you can install it through Package Management .
alexwlchan May 24 '13 at 10:36 2013-05-24 10:36
source share