A rough mapping to spellcheck the buffer
From Vim Tips Wiki
(Redirected from VimTip433)
Tip 433 • Previous Tip • Next Tip
Created: March 5, 2003 Complexity: intermediate Author: leorosa Minimum version: 6.0 Karma: 86/23 Imported from: Tip#433
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.
Of course, "-d br" option of ispell are only applied to Portuguese documents.
[edit] See also
- Using Ispell on a highlighted region
- A rough mapping to spellcheck the buffer (this tip)
- Spell check of word below cursor
- Spelling suggestions anywhere, even in console mode
