Get surrounding math environment #3193
-
Hello! I have an application, where I need to be able to detect if I'm inside a math zone and if so, get the boundaries of that math zone. For the former, VimTeX provides This works for inline math (e.g. \begin{equation}
2\begin{bmatrix}
1 & 1\\
1 & 1
\end{bmatrix} =
\begin{bmatrix}
2 & 2\\
2 & 2
\end{bmatrix}
\end{equation} In this case, For this, vimtex does provide My current best idea for how to implement this is (after checking that Thanks :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi! Thanks for opening this discussion. The Update: Please try the |
Beta Was this translation helpful? Give feedback.
Hi! Thanks for opening this discussion. The
vimtex#env#get_surrounding('math')
unfortunately does not work perfectly here. I'm looking into improving it now.Update: Please try the
vimtex#env#get_surrounding('math')
function now. I believe it should work as expected after b8503c0.