I've made a mymacros.sty file which I would like my LaTeX files to be able to access with commands that I've defined. I've managed to get it to work by putting \usepackage{mymacros} in my preamble.
However when I try to autocomplete I can't. I looked at this question:
How can I have TeXstudio recognize my own commands which it already auto-completes?
https://sourceforge.net/p/texstudio/wiki/Frequently%20Asked%20Questions/#how-does-txs-know-about-valid-commands), which recommends 3 ways of doing this, none of which work for me.
The first it recommends is to have mymacros.sty open in the editor. But this doesn't work.
The second is to activate the option Editor -> Automatically load included files in the configure TeXstudio options panel. However while I have an Editor tab , there is no such option there.
The third is to using .cwl files, however I'm not sure how to go about this. In the completion tab I've noticed that there is a mymacros.sty option that has come up, which I ticked but that has had no effect. Do I need to make my own mymacros.cwl file? I've tried to look this up but haven't had any luck.
Anyone have any ideas? Thanks in advance!




Configure TeXstudiooptions, on the bottom left, there is an option to toggle advanced options. Make sure that is ticked, then check theEditortab again. – Troy Mar 30 '17 at 15:20