Monday, March 1, 2010

Re: mass delete words based on spell

Hi Bee!

On Mo, 01 Mär 2010, Bee wrote:

> I have a long list of words, on word per line. Many of the words are
> not "words", i.e. not in a dictionary.
>
> I would like to turn on vim's spell check and delete only the words
> vim knows. Then I will go thru the remaining words and add them, or
> not, to my vim word list.

How about that:
:%s/\w\+/\=printf("%s",
empty(spellbadword(submatch(0))[0])?submatch(0):'')/
(one line)

regards,
Christian

--
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

No comments: