Sublime Forum

LaTeX: begin itemize snippet

#1

Hi,

when using the itemize environment snippet the produced code is

\begin{itemize}
	item 
\end{itemize}

missing the backslash in front of ‘item’.

To correct, used the following begin{}-end{}.sublime-snippet and place it in Preferences/LaTeX

<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>

The issue is present in ST2 and ST3. To fix the problem edit Preferences/LaTeX/begin{}-end{}.sublime-snippet . For ST3, you have to create this file as it is now shipped in a zipped package.

Problem: the Backslash in front of item is not escaped in the Mac OS X shipped version, neither in ST2 nor in the zipped package of ST3 (3065).

best

kdw

0 Likes