Add support for autocompletion of LaTeX commands with leading backslash #181
Description of the Change
As discussed in #180, this PR adds snippets that allow users to autocomplete existing snippets for LaTeX commands if they started them with a backslash (
I did this by inserting a separate snippet for each LaTeX command with backslash, before the snippet without backslash, in the snippets file of this repository.
I only changed at the snippets for standard LaTeX files, as I'm not that familiar with the other filetypes specified in the snippets file. I also did not add a backslash version of snippets which don't directly map to a LaTeX command, e.g.
As far as a I'm aware there is no other way to implementing this using just
As for the position of the snippets inside the
This users can now use a backslash (
"Double" the snippets might slow down the package, but I don't think this will be a problem given the current number of snippets.
This PR only covers half of the snippets, @ericcornelissen could you make them all have the double definition?
I personally don't mind if they transition completely to backslash only (though optional backslash fro math snippets could be nice), but that may disrupt people who have become used to no slash. For now, I'd say have the slash as optional for everything, and remove the non-slash option later.
The reason I did not do the same for any of the other snippets is because the
However, after a quick review of my changes I did note some snippets that can be transformed into a backslash version. So I'll be adding those and push them later
I don't think it is that simple. Both of your points are valid, disruption and backslash for things such as math. Especially the latter, as some snippets just don't work with a backslash as I explained above.
Personally, I use
I see the backslash as more of a way to stop the popup appearing every word, rather than any proper meaning.
I'm guessing that is a snippet you defined yourself? Cuz my Atom doesn't know about it
I actually do agree with that. I guess if you want to achieve that, you should get rid of snippets such as
Yup, I just don't want to see this package get neglected. It does have 200 000 downloads after all, and will be one of the first packages new LaTeX / Atom users will install. I'll see if I have publish permissions soon, after handling this PR.
On the other hand, at least until I take over the entire LaTeX / Atom ecosystem, I find having my own packages more freeing. I can implement what I want without needing others to aprove it. My grammar was written largely independently of this one (except where commented), and all my other packages mostly expect it (there are some scope differences which I haven't fixed yet).