I have a tikzpicture inside a latex file. My problem is that when I open the file and jump with GG
to the end of the file, the math environment inside the tikz-nodes is not highlighted (e.g. $v_0^1$
). The dollar signs as well as the stuff inside it is 'white'.
However, when I scroll (pressing j
) from the start to the bottom, it highlights the math stuff correctly (dollar signs as well as the math content). I have no clue why this happens.
I tried to create a minimal working example, and I really need the spaced lines + singleton lines to have the bug, otherwise it works correctly. Some things which might be interesstring to know: Removing the \section-command does fix the problem. My file has 144 lines, When I press GG
, the topmost line I still see is line 113. I run Arch Linux and vim version 'version 8.2.1704'. My .vimrc is
syntax enable
let g:tex_flavor = 'latex'
The file:
\documentclass[a4paper,11pt]{book}
\begin{document}
w
\section{test}
test
test
w
e
w
w
w
w
w
w
w
w
w
w
w
w
w
w
w
w
\begin{figure}[t]
\begin{tikzpicture}
\node[ above left = 8ex and 8ex of v1] (v01) {$v_0^1$};
\node[ below left = 8ex and 8ex of v1] (v02) {$v_0^\PVCParal$};
\node[below left = 1ex and 2ex of v02] (labelV0) {\Large$V_0(\GK)$};
\end{tikzpicture}
\end{figure}
\end{document}
:syntax sync fromstart
help?:help :syn-sync