home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / question / 16039 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.4 KB

  1. Path: sparky!uunet!math.fu-berlin.de!ira.uka.de!Germany.EU.net!pki-nbg!pki-nbg.philips.de!ln_smr
  2. From: ln_smr@pki-nbg.philips.de (Stephen Riehm)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: Spell checker from inside vi
  5. Message-ID: <ln_smr.728209122@pki-nbg.philips.de>
  6. Date: 28 Jan 93 08:18:42 GMT
  7. References: <C1HD54.Iv@news.udel.edu> <1993Jan26.170105.4573@doug.cae.wisc.edu>
  8. Sender: news@pki-nbg.philips.de
  9. Reply-To: ln_smr@pki-nbg.philips.de
  10. Lines: 44
  11.  
  12. saunders@luther.che.wisc.edu (Brian E. Saunders) writes:
  13.  
  14. >In article <C1HD54.Iv@news.udel.edu> william@bach.udel.edu (Wild William) writes:
  15. >>Is there a simple way to do spell checking on the current file from
  16. >>inside vi?
  17. >>
  18. >>i tried {!}spell but strange codes show up and it doesn't show any
  19. >>alternatives etc.
  20.  
  21. >I can pipe the lines through spell by going to the command line and typing
  22. >"1,$!spell", but unfortunately the output replaces all of your lines!  Does
  23. >anybody know how to redirect the output to the bottom of the file you are
  24. >currently working on?  This should be easy, but I don't know how to do it.
  25.  
  26. if you have the chance, get a copy of ispell (interactive spell). It
  27. actually has the courtesy to prompt you with suggested corrections
  28. etc, as opposed to spell's habit of simply dumping a list of wrong
  29. words on your doorstep.
  30.  
  31. If you have ispell, you can then create the following mapping:
  32.     map _S :w!^V^M:!ispell %^V^M:e!^VM^VM
  33. (The two ^V^M's at the end are intentional, I don't know why, but
  34. just having one doesn't work for me)
  35.  
  36. If you still insist on using spell, try the following mapping:
  37.     map _S :w!^V^M:!spell % > _sp^V^M:e! _sp^V^M^V^M
  38. This will put the badly spelt words into a file called _sp, and
  39. automatically start editing it. You can then swap between the original
  40. file and the list by using ^^ (ctrl-shift-6) or :e#.
  41.  
  42. in both cases I have _S as the spell check macro name, you can of
  43. course call it whatever you like :-)
  44.  
  45. best of luck!
  46.  
  47. --------------------------------------------------------------------
  48. Stephen Riehm           Configuration Management          _-_|\ 
  49. ln_smr@pki-nbg.philips.de  Philips Kommunikations Industrie  /     \
  50. Work: +49 911 526 2975       Nu"rnberg, Germany             \_.-.!/
  51. Fax:  +49 911 526 3678       "I was there, now I am here!"          v 
  52. "My company speaks another language, I CAN'T speak on its behalf"
  53. PS: You may think I am joking, I can't speak the language that well so
  54.         PLEASE DON'T REPLY IN GERMAN!
  55.              - thanks -
  56.