I am using syntax highlighting to help with writing LaTeX
documents in vim. My documents involve a lot of brackets, and it is easy to do a trivial mistake and end-up with something which doesn't compile; though it can be fixed, it wastes a lot of time.
Question : Is there any way to jump to the end/start of the highlighted pair? In the following picture \left\{
is recognised as a partner for \right\}
, how to go to anywhere near (start or end or middle) of \right\}
if the cursor is on :
\left\{
somewhere between
\left\{
and\right\}
Edit : As per comments -
+\sqrt{\frac{i}{2}} \sqrt{\frac{i-1}{2}} \left\{ e^{i t_{1} E_{i,i-1}} e^{i t_{2} E_{i-1,i}} - e^{i t_{2} E_{i,i-1}} e^{i t_{1} E_{i-1,i}} \right\} - \sqrt{\frac{i}{2}} \sqrt{\frac{i-2}{2}} \cancelto{0}{\left\{ e^{i t_{1} E_{i,i-1}} e^{i t_{2} E_{i-1,i-2}} - e^{i t_{2} E_{i,i-1}} e^{i t_{1} E_{i-1,i-2}} \right\}} \\
matchit
(:h matchit
) might work. It gives you the ability to jump between matching 'groups' with%
. Besides, could you post your first image as text? It'd be more readable (and I could copy to test on it).matchit
and if I can make it work, will update here.