SublimeText / LaTeXTools

LaTeX plugin for Sublime Text
https://latextools.readthedocs.io/
2.01k stars 364 forks source link

Autocompletion not working with Sublime 3 build #1429

Closed weixuanzhang closed 5 years ago

weixuanzhang commented 5 years ago

I noticed that the autocomplete functionality from LatexTools (autocomplete when typing \cite{ or \ref{) is not working, although "cite_auto_trigger" and "ref_auto_trigger" are set to true. My configurations: Sublime Text Build 3126 LatexTools Plugin version: 3.14.1 (2017-06-01) OS: Ubuntu 16.04 Thank you very much!

r-stein commented 5 years ago

Can you open the Sublime Text console ctrl+` and check whether errors occur? Did you overwrite the { keybinding in our user keybindings?

weixuanzhang commented 5 years ago

I reset the keybindings in LatexTools to default, and found the following definition of "{" keybinding in the general keymap. Could that be the problem? Screenshot from 2019-08-28 11-28-57

r-stein commented 5 years ago

Yes that is the problem. You have defined a keybinding for { in our user keybindings, which take precedence over the keybinding from LaTeXTools.

You may

  1. Copy the { keybindings from LaTeXTools below those in our user file
  2. You can add this: { "key": "selector", "operator": "equal", "operand": "- text.tex.latex" }, to the context in the first two keybindings. This will disable those keybindings inside latex files
  3. Do something different to change the keybinding precedence
weixuanzhang commented 5 years ago

Works like a charm! Thank you very much! I'll close the issue.