On 3 August 2015, David Woodfall <dave@dawoodfall.net> wrote:
> >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.
[...]
    You could try something like this instead (not tested):
syn match Ellipsis /\%(…|\.\.\.\)\s\+\zs[a-z].\{-}\>/ contains=@NoSpell transparent
    However, the effect is to ignore any word starting with a lower case
letter that follows an ellipsis, rather than just stop checking for a
capital letter after an ellipsis.
    /lcd
-- 
-- 
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.
Monday, August 3, 2015
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment