Saturday, April 3, 2021

Re: How to have the spell checker ignoring URLs and acronyms

Walter Cazzola wrote:
Dear Vim Experts,
bored to have acronyms and URLs marked as errors in my LaTeX files I have
looked for a solution. Here

   http://www.panozzaj.com/blog/2016/03/21/ignore-urls-and-acroynms-while-spell-checking-vim/

Suggests to add

   syn match UrlNoSpell '\w\+:\/\/[^[:space:]]\+' contains=@NoSpell
   syn match AcronymNoSpell '\<\(\u\|\d\)\{3,}s\?\>' contains=@NoSpell

in ~/.vim/after/tex.vim but it doesn't seem to work.
I suspect that you need to get your matches contained in various groups. For a start, consider also trying (in ~/.vim/after/tex.vim)

syn cluster texFoldGroup add=UrlNoSpell,AcronymNoSpell

You didn't provide any examples, so the above is a guess.

Chip Campbell

No comments: