Vim Tips Wiki
Register
No edit summary
 
(Change <tt> to <code>, perhaps also minor tweak.)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{review}}
 
{{review}}
  +
{{TipImported
{{Tip
 
 
|id=290
 
|id=290
  +
|previous=288
|title=Text Processing With Integrated Spell Checking
 
  +
|next=293
|created=July 26, 2002 13:35
+
|created=2002
 
|complexity=intermediate
 
|complexity=intermediate
 
|author=David Highley
 
|author=David Highley
 
|version=6.0
 
|version=6.0
 
|rating=27/14
 
|rating=27/14
  +
|category1=
|text=
 
  +
|category2=
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:
 
 
}}
  +
{{Deprecated|Vim now has built-in spell checking. See <code>:help spell</code>}}
  +
 
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
 
http://www.highley-recommended.com/text-processing.html
 
 
   
 
Everything has been tested with UNIX, Linux, Windows, and Windows with Cygwin patforms.
 
Everything has been tested with UNIX, Linux, Windows, and Windows with Cygwin patforms.
}}
 
   
== Comments ==
+
==Comments==
 
I used above successfully
Hi Y'All
 
   
 
If you happen to use Aspell on a Unix "shell" eg MKS on Win32 you may want
I used above successfully
 
   
 
:set shellslash (unix forward slash)
If you happen to use Aspell on a Unix "shell" eg MKS on Win32 you may want
 
   
  +
Also if you map the full path to aspell in your map eg c:/vim/aspell/aspell.exe you wont need an environment variable
: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
+
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>
   
  +
----
eg
 
  +
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 &lt;Leader&gt;s &lt;Esc&gt;:!c:/vim/aspell/aspell.exe -c --dont-backup %&lt;CR&gt;:e! %&lt;CR&gt;&lt;CR&gt;
 
   
 
map <Leader>s <Esc>:!c:\vim\aspell\aspell.exe -c --dont-backup %<CR>:e! %<CR><CR>
or
 
 
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
map &lt;Leader&gt;s &lt;Esc&gt;:!c:\vim\aspell\aspell.exe -c --dont-backup %&lt;CR&gt;:e! %&lt;CR&gt;&lt;CR&gt;
 
   
zzapper
 
 
david--AT--tvis.co.uk
 
, July 27, 2002 4:21
 
 
----
 
----
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 &lt;Leader&gt;s &lt;Esc&gt;:!c:\vim\aspell\aspell.exe -c --dont-backup %&lt;CR&gt;:e! %&lt;CR&gt;&lt;CR&gt;
 
 
to
 
 
map &lt;Leader&gt;s &lt;Esc&gt;:!c:\vim\aspell\aspell.exe -c --dont-backup "%"&lt;CR&gt;:e! "%"&lt;CR&gt;&lt;CR&gt;
 
 
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
 
   
  +
Read [[Toggle_spellcheck_with_function_keys]] to learn how to enable and disable spellchek for several languages with function keys or <Leader>s only when you need it.
   
dr_kludge--AT--users.sourceforge.net
 
, August 5, 2002 23:10
 
 
----
 
----
<!-- parsed by vimtips.py in 0.546731 seconds-->
 

Latest revision as of 05:23, 13 July 2012

Tip 290 Printable Monobook Previous Next

created 2002 · complexity intermediate · author David Highley · version 6.0


This tip is deprecated for the following reasons:

Vim now has built-in spell checking. See :help spell

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.

Comments[]

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

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>

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


Read Toggle_spellcheck_with_function_keys to learn how to enable and disable spellchek for several languages with function keys or <Leader>s only when you need it.