I want to extend the latex syntax for the given file:
\documentclass[a4paper,11pt]{book}
\begin{document}
\begin{figure}[t]
\begin{tikzpicture}
\node[alter] at (0,0) (v1) {typ0};
\end{tikzpicture}
\end{figure}
\end{document}
Right now, the name 'v1' gets spell-checked. I want to remove spell checking for it. Thus, I tried adding several commands to the .vim/ftplugin/tex_mappings.vim
file. However, everything I can come up would require me to add a lot more additional rules than I want to. E.g. the line
syn region texRefZone matchgroup=texStatement start="\\node" end=";\|%stopzone\>"
stops spell checking, but highlights everything from '[' to ';' in the 'Reference' color, which I don't want, plus it also disables spell checking for the stuff inside the curly brackets (typ0), but I want (the default) spell checking there. What is a nice way to disable spell checking for 'v1' without messing up everything else on this line? Thanks!
I run Arch Linux and vim version 'version 8.2.1704'. My .vimrc is
syntax enable
let g:tex_flavor = 'latex'
~/.vim/after/syntax/
; then it happens after the usual syntax.