I am editing a document in Vim. Some parts are in English, some in Dutch. Lets say, I have the following
A common form of lorem ipsum reads:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
"Lorem ipsum" text is derived from sections 1.10.33 of Cicero's De finibus bonorum et malorum.
Now, when spellchecking I'd like to mark the second paragraph (or any block, really) to be spellchecked in a different language. Or, alternatively, to not be spellchecked at all. Is that possible?
The document in question is markdown.
I'd like to mark the second paragraph (or any block, really) to be spellchecked in a different language.
There is a simple yet unsatisfactory answer to this: you can't do this. Sorry :-(
The best you can do is to use :set spelllang=en_gb,nl
, so it checks both languages:
alternatively, to not be spellchecked at all
This can be done by adding a new syntax group with contains=@NoSpell
. See :help :syn-spell
. It does require you to make some syntax rule though.
Also see Is it possible to turn on spell-checking for only parts of buffers? as well as this answer for some examples.