Sublime Forum

Completions priority (LaTeXTools)

#1

I am using LaTeXTools package. As its description goes, it

allows you to cycle among different completions: e.g. f in math mode expands to \phi first, but if you hit Tab again you get \varphi; if you hit Tab a third time, you get back \phi.

Indeed, in the file ‘LaTeX math.sublime-completions’ I see, e.g., these lines:

            { "trigger": "f", "contents": "\\phi" },
            { "trigger": "\\phi", "contents": "\\varphi" }, 
            { "trigger": "\\varphi", "contents": "\\phi" },

However, in practice this does not work. When I type ‘f’ and press Tab, I get \phi. But if I press repeatedly Tab again, I get \frac, and then words from the file that begin with f.

If I manually type ‘\phi’, however, then pressing Tab repeatedly toggles between \varphi and \phi, as promised

I had a clean install of ST3 to test if this may be a consequence of my custom settings/other packages, but this behavior is the same for clean ST3+LaTeXTools. Reading ST guide on completions, I see the priority of completion files comes before words in the buffer. Indeed, when I type f and press tab, the first completion \phi comes from the completion file. But on second Tab, completion comes from word buffer.

So what option should enabled/disabled to reproduce the behavior described in LaTeXTools guide?

0 Likes