Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!spool2.mu.edu!news.cs.indiana.edu!ux1.cso.uiuc.edu!cs.uiuc.edu!joshi From: joshi@cs.uiuc.edu (Anil Joshi) Newsgroups: comp.editors Subject: Re: Global Empty Line Removal in vi? Message-ID: <1991Jan28.214646.10668@cs.uiuc.edu> Date: 28 Jan 91 21:46:46 GMT References: <1991Jan24.172344.28877@Veritas.COM> <2692@wn1.sci.kun.nl> <1991Jan25.182043.10324@cs.uiuc.edu> <1991Jan28.014157.5388@cs.ucla.edu> Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL Lines: 51 gast@maui.cs.ucla.edu (David Gast) writes: >In article <1991Jan25.182043.10324@cs.uiuc.edu> joshi@cs.uiuc.edu (Anil Joshi) writes: >>>But using 1G!Gcat -s is easier. >>What a pain to do such a simple thing in vi. >>ISPF solution is >>exclude blank lines >>delete all exculded lines > ^^^^^^^^ >Why do you say that? 1G!Gcat -s is 11 characters including the return. >Your solution (if I counted correctly) is 46 characters including the >returns. That means that your solution is almost 4 times as long. The solution is far shorter if you use only the short forms for exculde etc. i.e. x and d for delete. >Further, your solution is not correct. You typed ``exculded'' instead >of ``excluded.'' While anyone can make a mistake, the more typing necessary, >the more likely it is that there will be a mistake. I have not given the exact syntax. It is the pseudo code but it is close enough. I agree with your point about mistakes. What about debugging, understandability and ease of enhancing? How would one eliminate lines made up of not blanks but say stars (or hyphens or underscores or ...). In vi one ends up writing one macro for each. In ISPF, one would parameterize. So less chance of making mistakes, changes made to this one macro will work in all situations, but in vi one has to keep track of all the macros which have the same form. >This newsgroup is primarily devoted to Unix editors. If you think that >many people want to discuss ISPF, why not start alt.editors.ispf? Even >when I have to use a PC clone, I use vi. From the name I got the impression that this group is for comp.editors. Discussing ISPF will be only academic because it is not available on unix. I see this to be a real disadvantage of unix. >David Gast >gast@cs.ucla.edu >{uunet,ucbvax,rutgers}!{ucla-cs,cs.ucla.edu}!gast Anil Joshi joshi@cs.uiuc.edu -- "Whatever we wish ourselves to be, we have the power to make ourselves. If what we are now has been the result of our own past actions,then it certainly follows that whatever we wish to be in the future, can be produced by our own present actions. how to act." - Vivekananda, Late Nineteenth Century Indian Philosopher