From 540ea1c2a055deaab5593c9f7bfa9f1d73f0e2e7 Mon Sep 17 00:00:00 2001 From: Alexander Gehrke Date: Mon, 3 Jun 2019 17:42:03 +0200 Subject: [PATCH] Disable spellchecking inside some LaTeX macros --- after/syntax/tex.vim | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 after/syntax/tex.vim diff --git a/after/syntax/tex.vim b/after/syntax/tex.vim new file mode 100644 index 0000000..9109f89 --- /dev/null +++ b/after/syntax/tex.vim @@ -0,0 +1,9 @@ +let s:texNoSpell=[ + \['texTypeStyle', 'texttt'], + \['texStatement', 'scala'], + \['texStatement', 'java'], + \] +for nospell in s:texNoSpell + exe "syntax match ".nospell[0]." '\\\\".nospell[1]."\\>' nextgroup=texCustomNoSpell" +endfor +syntax region texCustomNoSpell matchgroup=Delimiter start='{' end='}' contained contains=@NoSpell