Tuesday, September 7, 2021

Unable to turn off spelling for words followed by punctuation characters

I'm have a tough time turning off spell checking for words that immediately follow a punctuation character.

For example, I don't want any of the words in this path to be spellchecked:

/kjkj/kasjdf/kjdsf

So I did:

syn match UrlNoSpell '[\/]w\+' contains=@NoSpell

This works.

However, this doesn't:

syn match UrlNoSpell '[:punct:]w\+' contains=@NoSpell

Even this doesn't work:

"syn match UrlNoSpell '[\/\.]w\+' contains=@NoSpell

Any words preceded with a period are still spell checked. I tried with both magic and no magic. Nothing works.

I obviously don't know how character classes work in vim. Didn't find anything in :h regex that gave me any hints as to what the problem might be. Can someone clue me in?

--
--
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/081c45c1-fe53-4811-bd61-640e18d84522n%40googlegroups.com.

No comments:

Post a Comment