Milan Berta wrote:

> Is there any way how to count bad words in a file which is spelled? Or
> any function which can show an 'error rate' of a file? For example, the
> number of bad words per ten words, or a percentage of bad words in
> a file. I snooped the spell.txt help file thorough and found nothing :(
> 
> That would be cool to make an automatic dictionary selection function
> then. Using simple comparison of the error rates with some limit would
> make possible to select a proper .spl file, and a region. With
> a parameter, which defines the most used spell regions (e.g. en_gb, hu,
> cs, sk), could be frequent spell checking in different languages made
> a lot of friendly.
> 
> I'm personally using 3-4 different languages per day (e-mails,
> work,...), and using  the spell function of Vim 7 for a week I realised
> this inconvenience. Any suggestion how to make it solved without
> implementing a new feature?

There is no support inside Vim for this, but it should be possible to
make a script to do this.

I think what most people would like to use is a ":Spellenable" command
that would set 'spell' and figure out a good value for 'spelllang'.

Counting bad words could use the "]s" command.  You could do this for
the first 100 lines or so.  And loop over a number of values for
'spelllang'.  Either specified by the user or obtained from looking in
the spell directory.

Doesn't sound all that complicated...

-- 
ARTHUR: If you do not open these doors, we will take this castle by force ...
   [A bucket of slops land on ARTHUR.  He tries to retain his dignity.]
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to