home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / editors / 2052 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  2.4 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!mips!sdd.hp.com!caen!uwm.edu!ogicse!hsdndev!news.cs.umb.edu!mzraly
  2. From: mzraly@ra.cs.umb.edu (Michael S. Zraly)
  3. Newsgroups: comp.editors
  4. Subject: Re: Why I love VI
  5. Message-ID: <1992Aug21.040413.28174@cs.umb.edu>
  6. Date: 21 Aug 92 04:04:13 GMT
  7. References: <1992Aug10.100142.2416@ccu.umanitoba.ca>
  8. Sender: news@cs.umb.edu (USENET News System)
  9. Organization: UMass/Boston Dept. of Math & CS
  10. Lines: 49
  11. Nntp-Posting-Host: ra.cs.umb.edu
  12.  
  13. rahardj@ccu.umanitoba.ca (Budi Rahardjo) writes:
  14. >
  15. >    [...]
  16. >
  17. >                       What an editor should be
  18. >                            Budi Rahardjo
  19. >
  20. >     IMHO, justification should be  part of  a text  editor. Sometimes 
  21. >I'd like to write simple documents, like this text, with  centered and 
  22. >justified text.  This would be usefull in README files, or  documenta- 
  23. >tion to programs. FrameMaker and Interleaf would be overkill for  this 
  24. >kind of job, don't you think ?
  25. >
  26. >     I don't need fancy things, just two things;  center and  justify. 
  27. >Am I asking too much ? :-) BTW, this text was typed with VDE on an MS- 
  28. >DOS machine.
  29. >
  30. >     The 'fmt' command would not generate a nice format like this  :-) 
  31. >and the ability to justify the  text on  the fly  is essensial  for me 
  32. >(just a personal preference).
  33.  
  34.     Centering is easy in vi, just pipe text through a simple awk script,
  35. e.g.
  36.  
  37.     awk 'length>0 {for(x=(72-length)/2;x>0;--x)printf(" "); print}'
  38.  
  39. map this if you need to use it frequently.
  40.  
  41.     If you must justify *AND* fill, pipe through nroff (and uniq, to
  42. remove extra blank lines).  Use your favorite macro package.  (One thing
  43. I don't like about TeX is its inability to generate ASCII output, but
  44. that's only a peripheral issue here).
  45.  
  46.     The beauty of vi (and emacs too) is that it lets you use the under-
  47. lying operating system to its full advantage, without having to incor-
  48. porate code for things like fmt, fill, sort, uniq, nroff, awk, etc.  But
  49. it does require you to know how to take advantage of it: sometimes that
  50. means writing macros or mappings, sometimes shell scripts invoked by
  51. these macros.  You pay for this flexibility by having to do a little
  52. preparatory work, but on the other hand if you don't like the way that
  53. a particular mapping works, its not difficult to make improvements.
  54.  
  55.     All IMHO, of course.
  56.  
  57. -- Mike
  58.  
  59. -- 
  60. Mike Zraly        An effective way to deal with predators
  61. mzraly@cs.umb.edu    is to taste terrible.
  62.