Vim Tips Wiki
(Added link to autocorrect.vim script.)
m (Reverted edits by Emprego.curitiba (talk | block) to last version by JohnBot)
Tag: rollback
(2 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
|previous=1381
 
|previous=1381
 
|next=1384
 
|next=1384
|created=November 9, 2006
+
|created=2006
 
|complexity=basic
 
|complexity=basic
 
|author=Peter Hodge
 
|author=Peter Hodge
|version=5.7
+
|version=6.0
 
|rating=-1/14
 
|rating=-1/14
 
|category1=Abbreviations
 
|category1=Abbreviations
Line 30: Line 30:
 
</pre>
 
</pre>
   
For a list of English spelling corrections you can use immediately, check out [http://www.vim.org/scripts/script.php?script_id=2429 autocorrect.vim].
+
For a list of English spelling corrections you can use immediately, check out {{script|id=2429|text=autocorrect.vim}}.
   
 
==Comments==
 
==Comments==

Revision as of 14:50, 8 November 2011

Tip 1382 Printable Monobook Previous Next

created 2006 · complexity basic · author Peter Hodge · version 6.0


Vim's abbreviation feature also doubles as an on-the-fly spell checker. Simply create abbreviations for words you misspell often and Vim will fix them for you:

iabbrev mispell misspell
iabbrev funciton function
iabbrev functiton function
iabbrev fucntion function
iabbrev funtion function
iabbrev erturn return
iabbrev retunr return
iabbrev reutrn return
iabbrev reutn return
iabbrev queyr query
iabbrev htis this
iabbrev foreahc foreach
iabbrev forech foreach

For a list of English spelling corrections you can use immediately, check out autocorrect.vim.

Comments

Alternately:

set dict=/usr/dict/words
set spell

and turn completion on.