You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function vimtex#format#formatexpr defined in format.vim script just supports s:border_beginning and s:border_end variables. Is it possible to provide global variables g:vimtex_format_border_beginning and g:vimtex_border_end for user?
For example, when format following codes using gqap:
\begin{figure}[htpb]
\centering\includegraphics[scale=1.0]{fig1}
\caption{A long title a long title a long title a long title a long title a long title a long title}%\label{f:fig1}
\end{figure}
``` latexThe result is :``` latex\begin{figure}[htpb] \centering\includegraphics[scale=1.0]{fig1}\caption{A long title a long title a long title a long title a long title a long title a long title}%\label{f:fig1}\end{figure}``` latexThe expected result is:``` latex\begin{figure}[htpb]\centering\includegraphics[scale=1.0]{fig1}\caption{A long title a long title a long title a long title a long title a long title a long title}%\label{f:fig1}\end{figure}
Therefore, it is very convenient for user to custom formatting style if you can provide global variables.
Thank you very much!
The text was updated successfully, but these errors were encountered:
wenpengy
changed the title
Provide g:vimtex_format_border_beginning and g:vimtex_border_end options to custom formatting rule
Provide g:vimtex_format_border_beginning and g:vimtex_format_border_end options to custom formatting rule
Mar 22, 2022
The function vimtex#format#formatexpr defined in format.vim script just supports s:border_beginning and s:border_end variables. Is it possible to provide global variables g:vimtex_format_border_beginning and g:vimtex_border_end for user?
Yes, that could be possible. But I'm curious, perhaps it is a better effort to instead improve the built-in private variables so everyone can benefit?
The function vimtex#format#formatexpr defined in format.vim script just supports
s:border_beginning
ands:border_end
variables. Is it possible to provide global variablesg:vimtex_format_border_beginning
andg:vimtex_border_end
for user?For example, when format following codes using
gqap
:Therefore, it is very convenient for user to custom formatting style if you can provide global variables.
Thank you very much!
The text was updated successfully, but these errors were encountered: