I want to use the spelling rule:
begin first word in a sentence with capital letter, but Vim faultily recognises the end of a sentence when I use shortcuts that end with a dot.
The problem exists only with my native language. When using
en_gb this sentence is correct:
He likes many pets, e.g. cats.
But the Polish version is not correct (when using
pl as the spelling language):
On lubi różne zwierzęta, np. koty.
koty is marked with the capital letter error. Vim thinks that the dot that belongs to the shortcut
np. marks the end of sentence.
I tried to modify the
spellcapcheck setting by adding the
negative look behind to the regex:
:set spellcapcheck=(?<!np)[.?!]\_[\])'" \t]\+
This modification broke the rule entirely (Vim stopped showing capital letter error everywhere). Maybe my regex is not correct. But I also think I look at the wrong place to configure it, as the
spellcapcheck setting is not modified when the I set
:set spellcapcheck? spellcapcheck=[.?!]\_[\])'"^I ]\+