Is there a way to directly ask the Vim spell checker precisely why the word
under the cursor is misspelled?

It took me a bit to figure out how it paints a blue background behind bare
words on a line because they are not capitalized. For example:

foo

I can figure it out pretty easily from the suggestions listed by typing z=
in normal mode (while my cursor is on the highlighted non-capitalized word)
because the first suggestion is "Foo" with a capital F.

It would be handy to be able to get this information explicitly in Vim
script, similar to how I can use synIDattr() and synIDtrans() to query the
name and detail of the syntax highlighting group in effect at the current
cursor position. Getting the group "SpellCap" or something like "word [foo]
is not capitalized" would be helpful. I guess I'd prefer the first because
it is unambiguous and ":help SpellCap" works as expected.

Thanks!
-Adam


Related:

   -
   
https://stackoverflow.com/questions/36993988/how-can-i-find-out-the-syntax-group-of-the-current-character
   -
   
https://stackoverflow.com/questions/9464844/how-to-get-group-name-of-highlighting-under-cursor-in-vim
   - vim_use thread: VimL functions to determine spelling categories?
   <https://groups.google.com/g/vim_use/c/BzXA6He1pHg/m/pDBuFGM0wLEJ>
   - vim_use thread: Programmatically detect a current "highlight" setting?
   <https://groups.google.com/g/vim_use/c/aDc7dGPvIJk/m/bXO0MttmrJgJ>
   - SpellCheck script
   <https://www.vim.org/scripts/script.php?script_id=3844>

-- 
-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAKKOqGO_ipiwMJBjij%3DWWFFbKX3noF2Mp-JZSkNBBmRD_Guk6g%40mail.gmail.com.

Reply via email to