Tuesday, September 7, 2021

Re: Unable to turn off spelling for words followed by punctuation characters

OK, looks like the type of quotes makes the difference. With double quotes, things seem to be working now.

On Tuesday, September 7, 2021 at 7:52:29 AM UTC-4 Steve Dondley wrote:
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/3b7ed7b8-aa8f-4b6c-b08f-35ac28403a69n%40googlegroups.com.

No comments: