0

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.

2
  • Do you use LaTeXing or LaTeXTools?
    – r-stein
    Mar 17 '16 at 7:14
  • I use LaTeXTools (because LaTeXing isn't free).
    – Sidahmed
    Mar 17 '16 at 15:48
2

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.
3
  • Bro, it worked like a charm. I don't know how to thank you. I will just say thank you and wish you a lot of luck in what ever you do :D .
    – Sidahmed
    Mar 17 '16 at 17:53
  • can you tell me (if it doesn't bother you of course) the default loaded packages by texlive, so i can add this packages to the list you gave me (because latex-cw doesn't show all available commands even if i don't use external packages).
    – Sidahmed
    Mar 17 '16 at 18:05
  • Sorry I also don't know this, but these are the default packages for LaTeXTools. In addition the cwl lists might be incomplete and does not contain all packages. If you are missing a package, you can add it to the LaTeX-cwl.
    – r-stein
    Mar 17 '16 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.