Monday, February 24, 2014

automatically correct spelling

I use the following mapping to search backwards and correct automatically the first found misspelling.
The first option is the correct one in almost all cases.
nmap l ma[S1z=tr

it includes the following nested mappings.
The `tr' colors the corrected word, this makes it easy to spot incorrect or potentially
outrageous corrections.

nmap tr :exe "call matchadd('WildMenu','\\%".line('.').'l'.expand("\<cword\>") . "')"<CR>
nmap tl `a

How would I configure vim to automatically fire this macro when a word is misspelt,
like mainstream word processors do?

--
Eric Smith

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: