History Report a problem
Article Edit this page Discussion

A rough mapping to spellcheck the buffer

From Vim Tips Wiki

(Redirected from VimTip433)
Jump to: navigation, search
 

Tip 433Previous TipNext 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

[edit] Comments


Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Terminator Wiki
Legend of Zelda Wiki
Flash Gordon
Everquest II Wiki
Yo-Yo Wiki
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"A rough mapping to spellcheck the buffer"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation