For a quick reference on the Aspell utility use the command ``aspell
--help''.
3.1 Spellchecking Individual Files
To use Aspell to spellcheck a file type in
aspell check [«options»]
«filename»
at the command line where «filename»
is the file you want to check and «options»
is any number of optional options. Some of the more useful ones include:
--mode=«mode>
the mode to use when checking files.
The available modes are none, url, email, sgml, or tex. See section
5.4.2 for more informations on the various modes.
--dont-backup
don't create a backup file.
--sug-mode=«mode»
the suggestion
mode to use where mode is one of ultra, fast, normal, or bad-spellers.
See section 5.4.5 for more information on these modes.
--master=«name»
the main
dictionary to use. The default aspell installation provided the following
dictionaries: american, british, and canadian.
Please see Chapter 5 for more information on the
available options.
For example to check the file foo.txt:
aspell check foo.txt
and to check the file foo.txt using the bad-spellers suggestion mode
and the large American English dictionary:
If the mode option is not given then aspell will use the
extension of the file to determine the current mode. If the extension
is .tex, then TEX mode will be uses, if the extension is .html,
.htm, .php, or .sgml it will check the file in sgml mode, otherwise
it will use url mode. Please note that the sgml-options can
be used to change what extension are used for the sgml mode. See chapter
5.4.2 for more information on the various modes that can be
used.
If Aspell was compiled with curses support and the TERM environmental
variable is set to a capable terminal type than Aspell will use a
nice full screen interface. Otherwise it will use a simpler ``dumb''
terminal interface where the misspelled word is surrounded by two
'*'. In either case the interface should be self explanatory.
Aspell can be used as a drop in replacement for Ispell for programs
that use Ispell through a pipe such as Emacs and LyX. It can also
be used with programs that use simple call the ispell command and
expect the original file to be overwritten with the corrected version.
It support the basic features of Ispell, however it does not currently
have a Nroff mode so there may be situations in which you still wish
to use Ispell. Nevertheless, I have been using Aspell for Xemacs and
LyX since the middle of September of 1998 with out any problems.
If you do not have Ispell installed on your system and have installed
the Ispell compatibly script than you should not need to do anything
as most applications will that expect Ispell will work as expected
with Aspell via the Ispell compatibility script.
Otherwise, the recommended way to use Aspell as a replacement for
ispell is to change the Ispell command from within the program being
used. If the program uses ispell in pipe mode simple change ispell
to aspell. If the program calls the ispell command to check
the file change ``ispell'' with ``aspell check''.
If that is impossible and the program uses ispell through a pipe than
the run-with-aspell script can be used for programs using ispell in
pipe mode. The format of the script is:
run-with-aspell «command»
where «command» is the name
of the program with any optional arguments.
The old method of mapping Ispell to Aspell is discouraged because
it can create compatibility problems with programs that actually require
Ispell such as Ispell's own scripts.
(The following section was written by "R. Marc",
rmarc at copacetic net.)
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.
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 peoples comments change
speller to
aspell check
instead which will avoid switching aspell into email mode.