Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete after non-alphabetic symbols #1406

Closed
NeoFantom opened this issue Apr 19, 2019 · 1 comment
Closed

Autocomplete after non-alphabetic symbols #1406

NeoFantom opened this issue Apr 19, 2019 · 1 comment

Comments

@NeoFantom
Copy link

I noticed that I can't add auto-completion maps for non-alphabetic symbols in LaTeXTools\LaTeX_math.sublime-completions. For example:

{ "trigger": "0", "contents": "\\emptyset" },
{ "trigger": "-", "contents": "\\forall" },

These mappings would be useless. I personally prefer to use some non-alphabetical symbols since they really expand the choices I have for one-tap auto-completion. How can I solve this?

@ig0774
Copy link
Contributor

ig0774 commented Apr 22, 2019

  1. I wouldn't recommend directly editing LaTeXTools\LaTeX math.sublime-completions, since this file will be overwritten on updates to LaTeXTools. You can easily create your own completions file with the "scope": "text.tex.latex string.other.math, text.tex.latex meta.environment.math" line to trigger your completions in math mode.

  2. There are some underlying issue with non-alphanumeric characters in ST completions and in general word-boundaries. The core issue is reported here. There's not much I can think of we can do with a plugin, since this is fundamentally about how ST itself handles completions.

  3. In your examples, I can get the 0 trigger to work insofar as it turns up in the autocomplete drop-down and is replaced with \emptyset as expected. That said, you're right insofar as you can't just type 0 + tab and have things autocomplete the way they do for, e.g., a + tab.

@ig0774 ig0774 closed this as completed Apr 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants