home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / editors / 2747 < prev    next >
Encoding:
Internet Message Format  |  1992-11-14  |  2.6 KB

  1. Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!phys.ksu.edu!zchen
  2. From: zchen@phys.ksu.edu (Zheng Chen)
  3. Newsgroups: comp.editors
  4. Subject: Re: VI??? GROSS!
  5. Date: 13 Nov 1992 20:39:51 GMT
  6. Organization: Department of Physics, Kansas State University, Manhattan KS, USA
  7. Lines: 50
  8. Distribution: inet
  9. Message-ID: <1e13qnINN53n@moe.ksu.ksu.edu>
  10. References: <1992Nov13.124435.20019@cas.org> <1992Nov13.152821.6781@nsisrv.gsfc.nasa.gov> <Z8U84BL@math.fu-berlin.de>
  11. NNTP-Posting-Host: kelvin.phys.ksu.edu
  12.  
  13. In article <Z8U84BL@math.fu-berlin.de> wolff@inf.fu-berlin.de (Thomas Wolff) writes:
  14. >Most repliers to my posting seem to be that well accustomed to the fact 
  15. >that vi is a line editor that they didn't see my point when I wrote 
  16. >"arbitrary (!) block of text" (well, maybe "block" was misleading). This 
  17. >is not a block of lines (which is the unit of most vi operations) and 
  18. >since I referred to "elementary text editing tasks" I didn't mean columns 
  19. >either. Suppose I have the lines
  20. >    word1 word2 word1
  21. >    word3 word4 word3
  22. >and I need the text from "word2 " up to "word4" (assume it's a sentence) 
  23. >to be copied or moved elsewhere.If an editor cannot do this with a 
  24. >simple command sequence (and without the search trick burdening me with 
  25. >the task of counting the occurences of the word following my sentence 
  26. >within my sentence, if it can be done that way at all), I just do not 
  27. >call it a text editor.
  28. >Have a nice week-end.
  29. >Thomas
  30. >wolff@inf.fu-berlin.de
  31.  
  32.  
  33.  
  34.  
  35. This is easily done by first moving the cursor to the beginning of
  36. word2, type mx (where x can be any character), then move the cursor to
  37. the end of word4, type y`x to yank the block. Now you move the cursor
  38. to the place you want to put and type p. Is that easy? I learned this
  39. not very long ago.  As for dealing with blocks, Maurice can even tell
  40. you how to move the block (a real rectangle)
  41.         word2 word1
  42.         word4 word3
  43. to some place you like to put them. Isn't that amazing? I know no
  44. editor which can do this. BTW, Maurice, do you mind to post that little
  45. program mxy to the net? I find it very useful.
  46.  
  47. I just begin to really appreciate the usefulness of vi, thanks for the
  48. help from this news group. This is probably a good chance for me to
  49. thank those who helped me in the past. In fact, vi can do much more
  50. things than one can think about. You really have to work with it to
  51. appreciate. I used to work with many editors. For me, vi is the one to
  52. stay. Well, everybody has his/her own taste. That's how we are made
  53. of.
  54.  
  55.  
  56. Zheng Chen
  57.  
  58. --
  59.  
  60. ------------------------------------------------------------------------------------
  61. Zheng Chen
  62. zchen@phys.ksu.edu
  63.