https://invisible-island.net/vile/perl/


NAME

spell - spelling checker in vile

SYNOPSIS

    require "spell.pl"

In .vilerc

    perl "Vile::register 'spell', 'spell', 'Spell Check', 'spell.pl'"

In [x]vile

    :spell

    :perl spell

DESCRIPTION

This is a spelling checker written for use within [x]vile using the perl interface. It uses the "ispell" command internally and hence is compatible with ispell's usage of public and private dictionaries.

On invocation, it goes through the current buffer line by line, finding spelling errors and highlighting them. The current error is highlighted according to the following color code and in reverse.

If the word is not in the dictionary, but there are near misses, then the error is highlighted in green indicating mild error. If there are no near misses but the word could be formed by adding (illegal) affixes to a known root, the error is highlighted in cyan indicating moderately serious error. Finally, if the word is not in the dictionary, there are no near misses and no possible derivations found then the error is highlighted in red indicating a grave error.

As each error is highlighted in succession, the user is prompted to enter a single character command as follows (case is ignored):

    R    Replace the misspelled word completely

    S    Accept the word this time only

    A    Accept the word for the rest of this session

    I    Accept the word as it is, update private dictionary

    U    Accept the word, add lower case version to private
         dictionary

    Q    Quit the spell checker session

If the user chooses to replace the word, then he is prompted to enter the replacement word. If there are possible replacements found by the spell checker itself, the first is used as an initial value in the prompt. At this prompt, the user can <TAB> his way through all the possible replacements suggested by the spell checker. He can also partially fill in a replacement and <TAB> through all matching suggested replacements. On pressing <RET>, the word is replaced with the one provided by the user. On pressing <ESC>, replacement is aborted and the spell checker moves on to the next error.

As each new error is highlighted successively, old errors are switched from reverse to bold highlighting to allow the user to follow the progress of the spell checker and at the same time leave a trace of errors for later changes from outside the spell checker.

CAVEATS

Since the spell checker utilizes "ispell" program internally, it is mandatory that "ispell" be available in the users path.

Since the spell checker works in line by line mode, the "insert" and "uncap" commands don't update the private dictionary immediately but only on reaching the end of the current line.

CREDITS

Vile, Perl and Vile's Perl interface.

AUTHOR

Kuntal Daftary (daftary@cisco.com), 1998