What I finally added under _ vimrc is:
1 map <F9> :w!<CR>:!E:\Aspell\bin\aspell --lang=en check %<CR>:e! %<CR>
Execute Aspell to check the current file by pressing F9
Note:% In vimrc indicates the current file
E: \ Aspell \ bin \ Aspell change to the directory where your Aspell is located
=========== [References] ==============
[Transfer] http://ar.newsmth.net/thread-5ad4875c9af373.html
I always wanted Vim to enable spell check in WINXP, so that I could use beloved Vim at will.
So you don't have to use winedt to check spell.
So yesterday I got an Aspell and installed it.
You may have seen the vimaspell. vim or vimispell. Vim files and put them in
* There is no problem working in Nix. It can directly call ispell or Aspell. But under Win32,
Vimuses cmd.exe to execute External commands, so it is useless even if you add aspll to the path,
Vim cannot use this tutorial to check spell. I want to see how it works in vimaspell. Vim later.
You can find the Aspell command.
Another common solution is:
Map ^ t: W! <CR>: Aspell check % <CR>: E! % <CR>
Note: ^ t is a combination of <Ctrl + V> <Ctrl + T>. It cannot be typed in Win32, because
<Ctrl + V> is the shortcut cut of paste. One way is to write it to a file under * nix and copy it back,
Use the R command to read data in VI. --- That's how I did it myself. I'm stupid! Which of the following is a good solution?
Advice![Note: (see above) use <F9> instead of ^ t.]
Directly put this mapcommand in _ vimrcis useless. The original cause is as follows:
Aspell cannot be found at all.
So we have to add the full path of your aspll to the following: -- My is like this:
Map ^ t: W! <CR>: D: \ Aspell \ bin \ Aspell check % <CR>: E! % <CR>
Okay. Start VI and find a file at will. Of course there must be wrong words, or check what :),
Press Ctrl + T. Is there an error in the DOS window? Is it about this:
Error: No word lists can be found for the language "zh_cn"
Shell return 1
Yes, but it is much easier here,
In your VI:
: Lan en
Or
: Lan en_us
Unless you are using the e version system, this problem is normal in the Chinese system. You only need to temporarily modify the language attribute.
You can.
CTRL + T again
Is it an exciting winter in a DOS window?
This is my own achievement. You are welcome to make a decision!
The last step is:
Map ^ t: W! <CR>: Lan en <CR> :! <Path_to_aspell> \ bin \ Aspell check % <CR>: E! % <CR>