Did you ever want the capability of live spell-checking inside vi? Well, I did and I googled the subject and found this simple solution.
Assuming you have some sort of spell-checking software like ispell and agrep installed on your machine, you can use the "Engspchk" set of scripts for "multi-language", "on-the-fly spell checking." While the package documentation is pretty good, I will go ahead and narrow it down to a clean procedure.
1) Download the scripts, Unzip/untar them into your .vim directory.
4) To invoke the English spell-checker for a particular file, simply type '\ec'.
5) You can navigate through the spell-checking process using the following instructions:
Assuming you have some sort of spell-checking software like ispell and agrep installed on your machine, you can use the "Engspchk" set of scripts for "multi-language", "on-the-fly spell checking." While the package documentation is pretty good, I will go ahead and narrow it down to a clean procedure.
1) Download the scripts, Unzip/untar them into your .vim directory.
cp engspchk.tar.gz $HOME/.vim/2) Open your ~/.vimrc file and add this piece
cd $HOME/.vim/
tar zoxvf engspchk.tar.gz
" This piece enables live spellchecking inside Vim"3) Open a file using vi and enter ':helptags $HOME/.vim/doc'
set nocp
if version >= 600
filetype plugin indent on
endif
set mouse=a
let g:spchkmouse = 1
let g:spchkautonext= 1
let g:spchkdialect = "usa"
4) To invoke the English spell-checker for a particular file, simply type '\ec'.
5) You can navigate through the spell-checking process using the following instructions:
* use leftmouseThe three most relevant commands are:in text window to go to the next spelling error leftmouse
irrespective of where the mouse was (allows one to skip over
spelling errors)
* usemiddlemouse in the alternative spelling window to choose
the correct spelling and fix the word
* userightmouse in text window to go to next spelling error
based on where the mouse is
* userightmouse in text window to back up to the preceding
spelling error
* usein the alternative spelling window to fix all
such misspelled words
\ec (engspchk's startup map)The nice thing about this spellchecker is that it does not constantly hound you like others, it acts only when you invoke it.
\en (jump to next spelling error)
\ee (end engspchk)
Comments