Enno wrote:
Le vendredi 13 juin 2014 18:53:06 UTC+2, Charles Campbell a écrit :
Enno wrote:

Ok, I understand that spell checking is only activated after a
keyword, such as the \section{..} command. But why is it that
\begin{document} does not belong to these keywords? This disables
spell checking for example for letter document classes without any
sectioning. How to remedy this least intrusively?
Spell checking is activated for syntax regions.  Most of the preamble

should not be spell checked.  Spell checking *is* enabled for

\begin{document}..\end{document} (that's called a texDocZone by the

syntax highlighting), and it does work for the letter document classes

without sectioning.



Regards,

Chip Campbell
Hello,

there is c:\Program Files\Vim\vim74\syntax\tex.vim that says

" Maintainer:      Charles E. Campbell
" Last Change:     Mar 20, 2014
" Version: 81
" URL:             http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX

However, in the test file

\documentclass{article}

\begin{document}


\end{document}

the spell checking errors are only detected in the comments between 
\begin{document} and \end{document}, but not in the text itself.

This changes however, if a \section{...} command is added, for example.

Just tried it:

\documentclass{article}
\begin{document}
    This is junkk .  Loks like spell checkingx is woiking to mee!
    % This is junkk .  Loks like spell checkingx is woiking to mee!
\end{document}

Both the text and the comment were spell checked.
I used:

  vim -u vimrc.spellchk abc.tex

and both files are attached. I also used syntax/tex.vim v81, which you may get from my website: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX .

Regards,
Chip Campbell


--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
set nocp
syn on
setlocal spell spelllang=en_us

Attachment: abc.tex
Description: TeX document

Raspunde prin e-mail lui