[texworks] Maintaining indentation level with autocompletion

Timmy Timmy timmytimmytimmy7 at yahoo.com
Wed May 8 20:27:48 CEST 2013


Hi all,

Is there a setting that I can adjust to maintain indentation level with autocompletion? I'm having trouble articulating what I mean, so perhaps I should provide an example.

Suppose I have typed the following ($$$$ represents a tab).
\[
$$$$A =
$$$$matrix
\]
I now hit tab to trigger my autocompletion for "matrix" and TeXworks does the following (* represents a placeholder that I can jump to using tab).
\[
$$$$A =
$$$$\begin{matrix}
$$$$*
\end{matrix}
\]
However, what I want is the following.
\[
$$$$A =
$$$$\begin{matrix}
$$$$$$$$*
$$$$\end{matrix}
\]
Of course, I can make this particular example work by adding some tabs to the definition of my autocompletion. But what if matrix is two levels of indentations deep when I trigger autocompletion?
\[
$$$$A =
$$$$$$$$matrix
\]
Then, my modified autocompletion would give
\[
$$$$A =
$$$$$$$$\begin{matrix}
$$$$$$$$*
$$$$\end{matrix}
\]
when what I want is
\[
$$$$A =
$$$$$$$$\begin{matrix}
$$$$$$$$$$$$*
$$$$$$$$\end{matrix}
\]
Hopefully you can see what I want. This is the way that vim snippets work, and I want the same behavior in TeXworks.

Best,
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20130508/89ff5040/attachment.html>


More information about the texworks mailing list