# Customize auto-completion (more) in Texmaker

So I just found "User > Customize Completion" in texmaker and it seemed great. Quite soon I run into the problem with defining macros that span several lines.

I am able to get:

\begin{figure}[•] \centering \includegraphics[width=\linewidth]{•}

\end{figure}


but I would like:

\begin{figure}[•]
\centering
\includegraphics[width=\linewidth]{•}
\end{figure}


And maybe even an indent within the figure environment. As a frequent user of Overleaf I have grown used to being able of having this kind of auto-completion. Is it possible to configure?

Yes, at least 10 of them: User -> User tags -> Edit user tags.

If I add the following to one of the tags:

\begin{figure}[@]
\centering
\includegraphics[width=\linewidth]{@}
\end{figure}


and hit the corresponding keyboard shortcut in a document, I get

You can also customize tags under Structure -> User. Here, you can define as many tags as you want (so no restriction from number of available FX keys) with formatting. The tag is triggered by writing :(tag) and pressing the right arrow key in the editor.

I use this for all my more advanced autocompletion or to quickly access frequently used commands that are similar in name to others (e.g. \text{} or \cite{}, where I can circumvent that pesky \citep{}).

EDIT: On Andrew Swann's suggestion here are some screenshots showing the process.

Location of Structure -> User:

Add new tag (here I modify my own to input \text{}, but the idea is the same):

Result in editor:

• Welcome to TeX - LaTeX! Could you add some screenshots showing how to use this? – Andrew Swann Aug 16 '19 at 7:26
• Thanks for the welcome and the edit! I've added them to the post. – Makiaka Aug 16 '19 at 7:36