LaTeXTools icon indicating copy to clipboard operation
LaTeXTools copied to clipboard

Inline Math environment Autocomplete

Open mhafzal opened this issue 5 years ago • 2 comments

For inline math environment, $$ or ( ), It automatically converts underscore _ to curly brackets {}. For example If I want to write \beta_t, After pressing _ when I press any key, it automatically puts curly brackets so it will be written as \beta{t}. Can anyone please suggest a solution. Thanks

mhafzal avatar Oct 25 '19 20:10 mhafzal

Sorry for the late reply, we don't define a keybinding for _. If this is still an issue: Can you please open the ST console View > Show Console. Then write sublime.log_commands(True) and press the keybinding and check which command is executed.

If nothing helps you can also just overwrite the behavior with a corresponding keybinding in Preferences > Keybinding:

    {
        "keys": ["_"],
        "command": "insert",
        "args": {
            "characters": "_"
        },
        "context": [
            { "key": "selector", "operator": "equal", "operand": "text.tex.latex meta.environment.math" },
        ]
    },

r-stein avatar Feb 15 '20 10:02 r-stein

Hi, I have the same issue as @mhafzal. I tried overwriting the behavior and it works! Thanks!

jiajunluo121 avatar Jun 19 '20 16:06 jiajunluo121