From ec73e1661efca519f5ba093ac8de031bf285bfd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Thu, 7 Jan 2016 23:18:37 +0100 Subject: [PATCH] Fix #310: Enable spell checking at toplevel --- after/syntax/tex.vim | 4 ++++ test/issue/310/main.tex | 5 +++++ test/issue/310/subfile.tex | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 test/issue/310/main.tex create mode 100644 test/issue/310/subfile.tex diff --git a/after/syntax/tex.vim b/after/syntax/tex.vim index 51fbaa6..6a32558 100644 --- a/after/syntax/tex.vim +++ b/after/syntax/tex.vim @@ -11,6 +11,10 @@ elseif b:current_syntax !=# 'tex' finish endif +" Perform spell checking when there is no syntax +" - This will enable spell checking e.g. in toplevel of included files +syntax spell toplevel + " {{{1 Italic font, bold font and conceals let conceal = (has('conceal') && get(g:, 'tex_conceal', 'b') =~# 'b') diff --git a/test/issue/310/main.tex b/test/issue/310/main.tex new file mode 100644 index 0000000..70712df --- /dev/null +++ b/test/issue/310/main.tex @@ -0,0 +1,5 @@ +\documentclass{minimal} +\begin{document} +This is corrrectly spell cheked. +\input{subfile.tex} +\end{document} diff --git a/test/issue/310/subfile.tex b/test/issue/310/subfile.tex new file mode 100644 index 0000000..699b7c1 --- /dev/null +++ b/test/issue/310/subfile.tex @@ -0,0 +1,2 @@ +This ins't +% but coments are