home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / editors / 2805 < prev    next >
Encoding:
Text File  |  1992-11-18  |  2.1 KB  |  49 lines

  1. Newsgroups: comp.editors
  2. Path: sparky!uunet!ukma!darwin.sura.net!jvnc.net!princeton!sheps!bvaughan
  3. From: bvaughan@sheps.Princeton.EDU (Barbara Vaughan)
  4. Subject: Re: Arbitrary text blocks (Was: VI??? GROSS!)
  5. Message-ID: <1992Nov18.143424.14704@Princeton.EDU>
  6. Originator: news@nimaster
  7. Sender: news@Princeton.EDU (USENET News System)
  8. Nntp-Posting-Host: sheps.princeton.edu
  9. Organization: Princeton University
  10. References: <1992Nov16.221338.42264@datamark.co.nz> <1992Nov17.145011.24541@Princeton.EDU> <1992Nov17.005252@gruc19.nor.chevron.com>
  11. Date: Wed, 18 Nov 1992 14:34:24 GMT
  12. Lines: 35
  13.  
  14. In article <1992Nov17.005252@gruc19.nor.chevron.com> hjiwa@gruc19.nor.chevron.com (Jeff Wang) writes:
  15. >bvaughan@sheps.Princeton.EDU (Barbara Vaughan) writes:
  16. >|> 
  17. >|> 123456789
  18. >|> 987654321
  19. >|> 
  20. >|> I can use my editor to insert a column of blanks in front of each field so
  21. >|> it can be read into a spreadsheet program:
  22. >|> 
  23. >|> 12 34 56 78 9
  24. >|> 98 76 54 32 1
  25. >
  26. >You could use :%s\(..\)\(..\)\(..\)\(..\)\(.\)/\1 \2 \3 \4 \5/
  27. >to do that.
  28. >
  29. This thread has come full circle.  Here is my summary so far:
  30. A. says "vi can't handle rectangular blocks"
  31. B. says "yes it can; here is the arcane code to do what you want to do."
  32. C. says "That's so arcane; a good editor would do it much more transparently"
  33. D. says "Well, if you really want to do stuff like that, use a spreadsheet
  34.          or word processor; vi is an editor"
  35. E. I post three examples of tasks that are not suited to a spreadsheet or
  36.          wordprocessor but where easy handling of rectangular blocks would
  37.          be useful.  I didn't say vi couldn't do these things.  I just
  38.          wanted to illustrate that these are not tasks that are suited for
  39.          spreadsheets or word processors.     
  40. F., G., H., ... all post some arcane vi code or suggest using Basic (!!!) to
  41.          perform these tasks.
  42.  
  43. Actually, in the example above, I would probably use sed to insert the
  44. blanks.  I also use awk for some of the tasks I used to use an editor
  45. for (when I was a DOS person). Of all the editors I've used in my life, vi
  46. is neither the best nor the worst.
  47.  
  48. Barbara Vaughan
  49.