When you write \begin{figure} in latex and press enter, it automatically writes this:
\begin{figure}
\centering
\includegraphics{}
\caption{Caption}
\label{fig:enter-label}
\end{figure}
I want to change this so that it writes this instead:
\begin{figure}[h]
\centering
\includegraphics[width=\linewidth]{}
\caption{Caption}
\label{label}
\end{figure}
A minor change but this is an example to display the problem. I want to understand how to go about defining an environment which, when called, specifically writes a set of commands (like \centering \includegraphics[]{} \caption{}) in the code editor window that I can dynamically manipulate each time.
LMK if you need further explanation. Thanks for the help in advance.
I would also suggest using the completions incorporated in Sublime Text if at some point you decide to work with several files in a more customizable environment. You can still compile the main file in the IDE that you find more convenient or also create a build system in sublime depending on your needs.