1

After running set spell is see spelling mistakes as well as non-capitalised words. I can move between mistakes with [s or ]s, but is there a way to move between non-capitalised words?

Motivation is to write a function that capitalises all the non-capitalised words.

1
  • I think your best bet would be to create new mappings similar to [s and [s which would use the original command [s, check if the current highlighting group is SpellCap and either reuse [s if the group is not SpellCap or do nothing if it is. The problem however is that the traditional way to check for these highlighting groups doesn't work with SpellCap (see the question I just asked here.) So I guess your second option is to use some regexes to find words miscapitalized and cycle through the matches.
    – statox
    Jul 6 '20 at 18:25
1

I don't quite understand your problem, but there are these two hotkeys which ignore minor spelling errors, and only go to the really bad words, maybe thats what you mean by "move between no-capitalised words"

                            *]S*
]S          Like "]s" but only stop at bad words, not at rare
            words or words for another region.

                            *[S*
[S          Like "]S" but search backwards.

I.e. Just use capital S instead of s with [S and ]S

1
  • No, you misunderstood my question. I want to find words iff they are marked as "spelled correctly, but should be capitalised". Jul 7 '20 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.