History
Article Edit this page Discussion

Using Ispell on a highlighted region

From Vim Tips Wiki

(Redirected from VimTip172)
Jump to: navigation, search

This tip is deprecated for the following reasons:

We have :spell now

Tip 172 Previous Next Created: December 3, 2001 Complexity: basic Author: Carl Mueller Version: 6.0


Suppose you would like to use Ispell to check a word or region that you've visually highlighted. The following macro will do the job. Just type Shift-Insert while in visual mode.

vnoremap <S-Insert> <C-C>`<v`>s<Space><Esc>mq:e ispell.tmp<CR>i<C-R>"<Esc>:w<CR>:! xterm -bg ivory -fn 10x20 -e ispell %<CR><CR>:e %<CR><CR>ggVG<Esc>`<v`>s<Esc>:bwipeout!<CR>:!rm ispell.tmp*<CR>`q"_s<C-R>"<Esc>

This is based on Chip Campbell's macro which uses Ispell on the whole file (in normal mode).

noremap <S-Insert> :w<CR>:! xterm -bg ivory -fn 10x20 -e ispell %<CR><Space>:e %<CR><Space>

[edit] Comments

 TO DO 
Vim 7 has built-in spell checking. Some external programs might be worthwhile, but the tips relating to this topic need to be updated and merged, with information on Vim's spelling features. See the "Todo list" in the side panel.


If you replace the xterm/ispell part with:

c:\winnt\system32\command.com /c ispell %"

The tip will work with ispell on windows 2000. Command.com is required as cmd.exe does not support ANSI.sys (see ispell docs for more info).


Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Pixar
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Dark Shadows
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions


Vote for collaboration of the month.

Send this article to a friend
"Using Ispell on a highlighted region"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation