sponsor Vim development Vim logo Vim Book Ad

intermediate Tip #290: Text Processing With Integrated Spell Checking

 tip karma   Rating 23/13, Viewed by 2164 

created:   July 26, 2002 13:35      complexity:   intermediate
author:   David Highley      as of Vim:   6.0

I have written an HTML document to help others use Vim as a basic text processing application. It discusses how to integrate spell checking, dictionary, and thesaurus applications. It also talks about wrapping lines, indentation, justification, and the vim settings that effect the behavior of these operations. The document can be found at:
   http://www.highley-recommended.com/text-processing.html

Everything has been tested with UNIX, Linux, Windows, and Windows with Cygwin patforms.

 rate this tip  Life Changing Helpful Unfulfilling 

<<Alternative <escape> that allows you to do a "quick and dirty insert" and get out into normal mode | ^P & auto filling of variables and text >>

Additional Notes

[email protected], July 27, 2002 4:21
Hi Y'All

I used above successfully

If you happen to use Aspell on a Unix "shell" eg MKS on Win32 you may want

:set shellslash  (unix forward slash)

Also if you map the full path to aspell in your map eg c:/vim/aspell/aspell.exe you wont need an environment variable

eg
map <Leader>s <Esc>:!c:/vim/aspell/aspell.exe -c --dont-backup %<CR>:e! %<CR><CR>

or

map <Leader>s <Esc>:!c:\vim\aspell\aspell.exe -c --dont-backup %<CR>:e! %<CR><CR>

zzapper
[email protected], August 5, 2002 23:10
People love to put spaces in their file names in MS Windows
these days.  I used the aspell lines provided with the full path
as noted by zzapper, david at tvis dot co dot uk.  At first his
example did not work because I was using someone's file
with a space in it for testing.  I then changed

map <Leader>s <Esc>:!c:\vim\aspell\aspell.exe -c --dont-backup %<CR>:e! %<CR><CR>

   to

map <Leader>s <Esc>:!c:\vim\aspell\aspell.exe -c --dont-backup "%"<CR>:e! "%"<CR><CR>

Please note the quotes around the percent sign, "%".  
Both the tip and David's note are very effective.  You'd want
to do something similar on Linux too.  Especially if you are
serving up files with Samba.  See http://www.samba.org

Thanks,
Greg Morgan
Dr. Kludge
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
Sponsored by Web Concept Group Inc. SourceForge Logo