Attached is a patch that adds a few spell checking related items:
- ability to spell-check subwords
- def-var (def_spell_check_subwords) to turn on/off subword spell checking
- spell-check-whole-file command to start spell checking at the top of the file
- cur_subword() method to get the current subword under the cursor (independent of subword navigation options)
I added "spell-check-whole-file" to the Spell submenu as follows:
submenu "&Spell Check","help spell check menu","Displays menu of spell checking commands","ncw" {
"Check from &Top","spell-check-whole-file","","help spell check menu","Spell check from top of file";
"&Check from Cursor","spell-check","nrdonly|nicon","help spell check menu","Spell check starting from cursor";
The subword option is off by default, but it would probably be more useful turned on by default.
The one strength / weakness of the implementation is that when it encounters a CamelCase word, it will break it down and spell check the subwords, but never offer to let you add the whole word to your spell dictionary. That's good because you do not have to click through symbols like "getBetterSpellChecker", which makes spell checking source code a lot faster.
This does not integrate with live spell checking at all.