Sublime Forum

How to use autocomplete when edit tex files?

#1

When I try to edit tex files, it seems that autocomplete doesn’t work. I find latex package and find autocomplete snippet.

for example begin{}-end{}.sublime-snippet

<snippet>
    <content><![CDATA[\\begin{${1:env}}
	${1/(enumerate|itemize|list)|(description)|.*/(?1:\item )(?2:\item)/}$0
\\end{${1:env}}]]></content>
    <tabTrigger>begin</tabTrigger>
    <scope>text.tex.latex</scope>
    <description>\begin{}…\end{}</description>
</snippet>

As the code shows, when I enter begin, it will trigger autocomplete. But in fact nothing happen. What should I do?

0 Likes

#2

Thanks for the post https://forum.sublimetext.com/t/realtime-autocomplete-for-tex-files/7440/3&hilit=tex+autocomplete#p38073.

I finally get the solution and here it is:

Edit user-setting file and add the code below

"auto_complete_selector": "source - comment", "latex - comment"]

And enjoy your latex! :smiley: :smiley:

0 Likes