Friday, April 2, 2021

How to have the spell checker ignoring URLs and acronyms

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.

:scriptnames lists the file correctly loaded

226: /usr/share/vim/vim82/ftplugin/tex.vim
227: /usr/share/vim/vim82/ftplugin/plaintex.vim
228: /usr/share/vim/vim82/ftplugin/initex.vim
229: ~/.vim/bundle/vim-polyglot/after/ftplugin/tex.vim
230: /usr/share/vim/vim82/syntax/tex.vim
231: ~/.vim/bundle/vim-polyglot/after/syntax/tex.vim
232: ~/.vim/after/syntax/tex.vim

But it seems ignored and all my acronyms are still marked as errors.

I've already commented out all the plugins and still they are ignored.

What am I doing wrong?

I'm using Vim 8.2 on a linux box, Vundle is my plugin manager and I've
vim-latex installed.

Any help is welcome. Thank you.

Walter

PS. Note that to add all the acronyms to the list of known words is not a
feasible option.

--

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/4d485454-42cc-50aa-6685-ca8cd94e8c67%40di.unimi.it.

No comments:

Post a Comment