Sublime Forum

LaTeXTools: trigger

#1

Hey,

In the User folder, I placed LaTeX.sublime-completions added the following code:

{
        "scope": "text.tex.latex",

        "completions":
        
                { "trigger": "fb", "contents": "\\farbbox{$1}$0"},
        ]
}

If I type “fb” and hit Tab it just extends it to “farbbox” and not “\farbbox{}”.

How could I resolve it?

Regards
Chris

0 Likes

#2

Weird… do the other completions work? In particular, those beginning with f, e.g., \forall?

0 Likes

#3

No. If I type “f” and press Tab, it gets completed to “figure”. :neutral_face:

But, if I add the trigger definitions to the completion file, directly located in the folder “LaTeXTools”, the trigger work. Hmmmm…

0 Likes

#4

Any further ideas?

Christian

0 Likes

#5

The last comma in the trigger line is ‘bad’ JSON (very unpractical). For me, your completion works if I omit it.

[code]{
“scope”: “text.tex.latex”,

    "completions":
    
            { "trigger": "fb", "contents": "\\farbbox{$1}$0"}
    ]

}[/code]

Regards,
t

0 Likes

#6

Argh! Thanks a lot, that helped.

best
c

0 Likes