1
votes

I just started using Atom for LaTeX, and i use a lot of snippets to make my life easier.

Now, this often means that i will "nest" snippets, meaning i might use a snippet for a fraction ...

\frac{$1}{$2} $0

... and then insert another snippet inside of this one, e.g.

\sqrt{$1} $0

Now, i have an issue where the pointers "break" when nesting the snippets. So, when i insert the square root snippet into the fraction snippet, the function to tab into the next pointer continues for the squareroot snippet, but breaks for the fraction snippet.

Is there a way to circumvent this?

Thanks :)

1

1 Answers

0
votes

As of December 2018... this has been an issue for a while now. Atom's snippets package doesn't do well when trying to insert a snippet with tab stops into another snippet with tab stops. You can view the issue here: https://github.com/atom/snippets/issues/152

Also, there has been a pull request to fix the issue, but it hasn't been merged into the master branch... and it's quite old and because of that, the patch has some file conflicts so you can't just apply the patch without resolving those conflicts. You can view that pull request here: https://github.com/atom/snippets/pull/192

This may be fixed in the future, but I wouldn't hold my breath. Your best bet for fixing this issue is to either fork the snippets package and create your own that works as expected or to try to use the code here to patch your local copy of the snippets package