sponsor Vim development Vim logo Vim Book Ad

intermediate Tip #433: a rough mapping to spellcheck the buffer

 tip karma   Rating 2/2, Viewed by 688 

created:   March 5, 2003 11:26      complexity:   intermediate
author:   leorosa      as of Vim:   6.0

well, certainly

well, certainly there are plugins to do this much better, but, if you
like to have most of the stuff placed on your vimrc file, the
following must help:

map ,SS :exec system("ispell -l -t -d br < ".expand("%")." \| sort -u \| sed 's/\\(.*\\)/syntax match Underlined \"\\\\<\\1\\\\>\" contains=TOP /'")

basically, i use 'ispell' to collect all misspelled words, and assign
each one to the 'Underlined' syntax group (seems better than 'Error')
=]

improvements aren't so hard to do; actually, I use another mappings
for another 'spell' functions, but the essential can fit in just one
line;

leorosa

 rate this tip  Life Changing Helpful Unfulfilling 

<<Putting the current file on the Windows clipboard | Autogroup commands for C/C++ editing - inserting skeletons etc (long post!) >>

Additional Notes

Anonymous, March 5, 2003 11:29
of course, "-d br" option of ispell are only applied to portuguese documents...

leorosa
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to vim@vim.org after searching the archive. Help Bram help Uganda.
Sponsored by Web Concept Group Inc. SourceForge Logo