I recently made myself custom insert mode keybindings to type faster in LaTeX. However, When I use them, Vim adds tabs that weren't part of the original keybinding.
Example:
Here is my inoremap
:
autocmd FileType tex inoremap ;t \begin{table}<Enter>\caption{}<Enter>\label{<++>}<Enter>\begin{center}<Enter>\begin{tabular}{<++>}<Enter>\toprule<Enter><++><Space>\\<Enter>\toprule<Enter><++><Space>\\<Enter><++><Space>\\<Enter>\bottomrule<Enter>\end{tabular}<Enter>\end{center}<Enter>\end{table}<Enter><Enter><++><Esc>?caption{<Enter>8li
This is the output (<X>
is the final location of my cursor):
\begin{table}
\caption{<X>}
\label{<++>}
\begin{center}
\begin{tabular}{<++>}
\toprule
<++> \\
\toprule
<++> \\
<++> \\
\bottomrule
\end{tabular}
\end{center}
\end{table}
<++>
Why isn't everything lining up at the beginning of the line? (the previous lines are not indented)
Thanks!
P.S.
I know that it would be more appropriate to use functions instead of mapping but I haven't learned them yet...
<++>
are the jump markers used by vim-latex. Vim-latex provides a different mechanism for template expansion: github.com/vim-latex/vim-latex/blob/master/plugin/… and vim-latex.sourceforge.net/documentation/latex-suite/… – Hotschke Jan 22 '19 at 18:59