[Tex/LaTex] sublime text latex autocompletion for all available packages

linuxsublime-texttexliveUbuntu

I installed the plugin latex-cw on sublime text 3, and this plugin is cool, because it shows me completion for a lot of latex commands.

The problem is, if I install or use a new package, latex-cw won't show me a completion for the new available commands.

So, is there another sublime text 3 plugin that build some kind of new index for the new available commands or packages ??!!

PS : I am using Ubuntu 15.10 with latex distribution texlive.

PS2 : I know that it may seems stupid, or exaggerated to some of you, but I really have a very weak memory, and working without autocompletion is just very hard and consumes a lot of my energy just for command remembering.

Best Answer

This is currently not implemented in LaTeXTools and there is no package, which adds this functionality to it. However it will be implemented in the future. Since cwl support has only recently (November 2015) added to LaTeXTools, it still requires improvements. There is already a PR to include it, but is has conflicts with other already merged functionalities (e.g. cwl completion for environments).

Until it is included you have two possibilities:

  1. recommended You can manually add the packages to the packages list. Open your settings and add the entry:
"cwl_list": [
    "tex.cwl",
    "latex-209.cwl",
    "latex-document.cwl",
    "latex-l2tabu.cwl",
    "latex-mathsymbols.cwl"
  ]

these are the basic included packages. Now you can add the packages you usually use to the list with a .cwl appended. E.g.:

"cwl_list": [
    "tex.cwl",
    "latex-209.cwl",
    "latex-document.cwl",
    "latex-l2tabu.cwl",
    "latex-mathsymbols.cwl",
    "amsmath.cwl",
    "color.cwl"
  ]

This is not automatically, but I think it will solve your problem.

  1. You can manually checkout the branch of the PR: Open your Packages folder and remove the LaTeXTools packages. Open a bash in the folder and write: git clone https://github.com/ig0774/LaTeXTools.git -b cwl_autoload. This will clone the branch into your packages folder. However I would not recommend this, because you won't get new features and bugfixes.