Tuesday, September 14, 2021

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

Hi,

Steve Dondley schrieb am 07.09.2021 um 13:47:
> 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

the syntax for a character class inside a collection is wrong. You
need to use two sets of brackets, i.e.,

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

(I assume the missing backslash before w\+ was just a typo in your mail
or the result of some backslash interpretation by you mail client.)

Regards,
Jürgen


--
--
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/2ddfa439-03d9-d61e-8896-b976ceb48b35%40googlemail.com.

No comments: