GNU Aspell 0.60.8: Using Aspell with other Applications
Description: Aspell 0.60.8 spell checker user’s manual.

Previous: Using Aspell as a Replacement for Ispell, Up: Basic Usage [Contents]

### 3.3 Using Aspell with other Applications

#### 3.3.1 With Enchant Based Applications

Enchant is a generic spell checking library with multiple backends used by many applications that provide spell checker functionality. Enchant is used by AbiWord; LyX; and via gspell and GtkSpell, a number of Gtk and GNOME applications.

By default enchant is configuired to prefer Hunaspell over Aspell but this can easily be changed on a per-language basis. If you wish to use Aspell for a specific dictionary say, American English, make sure that the Aspell backend is installed (on Debian and Ubuntu based system it is included as part of the base package) then create the file `~/.config/enchant/enchant.ordering` that contains the single line:

    en_US:aspell

To test it. Restart the enchant based application and then compare the suggestion list with an application that used Aspell or by using the ‘`aspell check`’ or ‘`aspell pipe`’ commands.

You can also prefer Aspell in general over Humspell by instead using:

    *:aspell,hunspell

Then if an Aspell dictionary is available Enchant should use it.

#### 3.3.2 With Emacs and XEmacs

Newer versions of emacs should prefer `aspell` over both `ispell` and `hunspell`, if you find this is not the case, then addding the line:

    (setq-default ispell-program-name "aspell")

to the end of your `.emacs` file should convince emacs to use Aspell.

#### 3.3.3 With VIM

To use Aspell in VIM you simply need to add the following line to your `.vimrc` file:

    map ^T :w!<CR>:!aspell check %<CR>:e! %<CR>

I use `Ctrl-T` since that’s the way you spell check in `pico`. In order to add a control character to your `.vimrc` you must type `Ctrl-v` first. In this case `Ctrl-v Ctrl-t`.

A more useful way to use Aspell, IMHO, is in combination with Newsbody (http://www.image.dk/~byrial/newsbody/) which is how I use it since VIM is my editor for my mailer and my news reader.

    map ^T\\1\\2<CR>:e! %<CR>
    map \\1 :w!<CR>
    map \\2 :!newsbody -qs -n % -p aspell check \\%f<CR>

#### 3.3.4 With Pine

To use Aspell in Pine simply change the option `speller` to

    aspell --mode=email check

To change the `speller` option go to the main menu. Type `S` for setup, `C` for config, then `W` for where is. Type in `speller` as the word to find. The speller option should be highlighted now. Hit enter, type in the above line, and hit enter again. Then type `E` for exit setup and `Y` to save the change.

If you have a strong desire to check other people’s comments change `speller` to

    aspell check

instead which will avoid switching Aspell into email mode.

Previous: Using Aspell as a Replacement for Ispell, Up: Basic Usage [Contents]