LaTeXYZ
LaTeXYZ copied to clipboard
^ triggering odd response
Suppost I want to get \psi^a. When I type \psi + ^ + a, what I get instead is \psi{a}. The ^ followed by a yields an {a}. Is that intended? It really disrupts the work flow for me (I do not always write \psi^{a})
(Lovely package!)
Are you sure it is caused by LaTeXYZ?
I would think so. I have been using LatexTools for ages. This hevavior appeared for the first time right after I installed LaTeXYZ few days ago. a.
On May 6, 2018, at 3:09 PM, Randy Lai [email protected] wrote:
Are you sure it is caused by LaTeXYZ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/randy3k/LaTeXYZ/issues/15#issuecomment-386878356, or mute the thread https://github.com/notifications/unsubscribe-auth/AF2ezjzhNUqUuc-mAK3WfkYJHNFNiDPeks5tvvYbgaJpZM4T0AeO.
Found the source of the problem. There was a conflicting keybinding in my LaTeXTools files. It must have interfered with some bindings in LaTeXYZ which after the installation of the latter caused the odd behavior. Apologies for the noise.
Great.
@aaltland can u say, what I need to do to resolve the same problem?
Sorry to say, no. I forgot. I guess I just inspected occurrences of '^' in the LaTeXTools files, but really can't remember. If it helps, I can send you my keybinding files.
@aaltland Ok, send it, please)
I had the same issue. As far as I can tell, I have no conflicting keybindings. I fixed it by adding the following to my key bindings
{ "keys": ["^"], "command": "insert_snippet", "args": {"contents": "^"}, "context": [
{ "key": "selector", "operator": "equal", "operand": "text.tex.latex meta.environment.math" },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\^$", "match_all": true }
]
},
but I lost the ability to use the double ^^.
The culprit seems to be the following
{ "keys": ["^"], "command": "latexyz_insert_snippet", "args": {"contents": "{$0}", "create_fields": true}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.tex.latex meta.environment.math" },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\^$", "match_all": true }
]
},
in the file support/Default.sublime-keymap
. Is this working as intended?