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

LaTeX: one-letter key is not a good idea #364

Open
firmart opened this issue Jan 29, 2020 · 0 comments
Open

LaTeX: one-letter key is not a good idea #364

firmart opened this issue Jan 29, 2020 · 0 comments

Comments

@firmart
Copy link

firmart commented Jan 29, 2020

Writing LaTeX with (setq yas-triggers-in-field t), which allows expanding snippet inside snippet, is very convenient. However, there are some one-letter key snippets in this repo that expand unexpectedly when I use <TAB> to move to the next field.

Example: \(g\)

I have a snippet <m which expands to \($1\)$0. When I want to write a function g in LaTeX, I type <m, g then <TAB>. However, since yas-triggers-in-field is activated, the <TAB> expands g to \gls{${1:label}}.

Since a function is very often named g (when f is already defined), this happens to be quite annoying.

As issue #69 stated, common words should not be used as a key.
I suggest to use gls as a key name or prepend the key by a common prefix.

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

1 participant