Monday, August 3, 2015

Re: Spell: Don't check for a capital after an ellipsis?

>>How can I tell vim's spellchecker not to highlight words after an
>>ellipsis which aren't capitalised?
>
>After some googling I didn't find an exact find, but found a useful
>function here:
>http://stackoverflow.com/questions/7561603/vim-spell-check-ignore-capitalized-words
>
>which I translated so:
>
>fun! IgnoreEllipsis()
> syn match Ellipsis /.*[.][.][.]\s[a-z]*/ contains=@NoSpell transparent
> syn cluster Spell add=Ellipsis
>endfun
>
>Unfortunately it doesn't work and I'm guessing the regex is wrong, as
>a simple 'echomsg "bla"' does show it being called.
>
>Any ideas?

I gather that spellcapcheck is the culprit here, because it is set to
any number of periods to denote the end of a sentence, instead of just
one:

[.?!][\\])'\"\t\ ]\\+

But when I try to limit it to one period following a word character or
lowercase character (\\w and \\l) highlighting of sentence endings fails.

When I try to limit to 1 occurrence it takes no notice.

I have tried these so far:

\\w[.?!][\\])'\"\t\ ]\\+
\\l[.?!][\\])'\"\t\ ]\\+
[.?!]\\{1}[\\])'\"\t\ ]\\+

None work as desired.


--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment