Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make vim SpellCheck *not* code aware?

By default, vim spell checker is code aware, so it doesn't spell-check code parts of the file. In effect, in markdown it considers (pandoc multiline) tables to be codes and thus doesn't spell-check their contents.

Is it possible to override this? Or enable spell-check for the entire file including code.

like image 727
Mustafa Avatar asked Dec 02 '14 15:12

Mustafa


3 Answers

As far as I'm able to determine, there is no way to tell Vim to ignore the spellcheck suggestions in the syntax file and to just "check everything".

A fairly heavy-handed workaround is to disable syntax entirely with :syn off; you can re-enable this with :syn on.

Specifically for Markdown, you can disable highlighting of code blocks with :syn clear markdownCodeBlock; you can reset this with :syn on as well.

like image 173
Martin Tournoij Avatar answered Oct 05 '22 06:10

Martin Tournoij


Use syntax spell

:syntax spell toplevel

See: http://usevim.com/2013/05/10/synspell/

like image 32
Arjen Dijkstra Avatar answered Oct 05 '22 06:10

Arjen Dijkstra


In that case I would contact the maintainer of the markdown syntax file and ask him/she if (s)he could fix this issue.

like image 26
Luc Hermitte Avatar answered Oct 05 '22 05:10

Luc Hermitte