<<< Date Index >>>     <<< Thread Index >>>

Re: Spellcheck



On 2007-10-05, Rem P Roberti <rem@xxxxxxxxxx> wrote:

> So, ispell works well enough (although I have heard that aspell 
> is better), but you have motivated me to look into vim. I have 
> become rather attached to vi, and have taken some pains to 
> learn to use it. Unfortunately, there is now only vim and vim6 
> in the FreeBSD ports collection. 

This shouldn't be a problem.  Vim in 'compatible' mode is a very 
good implementation of standard vi.

I started using vim when HP rolled HP-UX to a new version that 
contained a vi with more bugs than I could tolerate.  I used only 
the pure vi features at first, then gradually learned the vim 
enhancements.

As for using ispell with vi, I used to use the following script to 
run ispell on buffers or selected regions of buffers.  I was very 
happy with it, but now I find vim's built-in spell checker much more 
convenient.

----------------------------- cut here -----------------------------
#!/bin/sh
#ispell-filter
#
# Ives Aerts, ives AT lynch DOT sonytel DOT be 
#
# This script can be used to run ispell on stdin, returning the 
# result through stdout. 
# 
# It can be used from VI or VIM like this 
# :%! $HOME/bin/ispell-filter 
# 
# Or map it to a key sequence in .exrc and .vimrc 
# In .vimrc add a <cr> to the end
# map v :%! $HOME/bin/ispell-filter 
#
#
cat     > /tmp/tmp.$$
ispell $* /tmp/tmp.$$ < /dev/tty > /dev/tty
cat       /tmp/tmp.$$ 
rm -f     /tmp/tmp.$$
----------------------------- cut here -----------------------------

Regards,
Gary