Path: utzoo!attcan!uunet!peregrine!elroy.jpl.nasa.gov!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!joshi From: joshi@cs.uiuc.edu (Anil Joshi) Newsgroups: comp.editors Subject: Re: vi Alternative Required (long posting) Message-ID: Date: 5 Dec 90 23:39:10 GMT References: <1616@ukpoit.co.uk> <109752@convex.convex.com> <1005@langtry.cs.utexas.edu> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 197 mayoff@cs.utexas.edu (Robert Mayoff) writes: >In article joshi@cs.uiuc.edu (Anil Joshi) writes: >>The point of the matter is that vi sucks in sveral ways, where as >>ISPF is a truly wonderful editor. >Whoah. A bit of an opinion, don't you think? What is wrong in expressing an opinion? >Let me say right up front that I have used (in this order): >1. Personal Editor II for the IBM PC >2. Turbo Pascal (and, later, Turbo C) Editor >3. vi >4. XEDIT on VM/CMS >5. emacs >6. ISPF on VM/CMS Have you used ISPF on MVS? >non-computer-oriented is PE2 for the PC, and the best for computer people is >either vi or emacs. Let me explain why. ^^^^^^^^^^^^^^^^^^^ I don't agree with you on this. You have not answered the questions I asked in my original note re. some capabilities. >PE2 has *excellent* response time, supports multiple files and windows, and has I can't say much on this topic, because I have not used PE2. >doesn't have much of a macro capability, as I recall. I never liked it very >much, though I don't remember why now (it's been a long time). Neither did I. Reason is simply that they are not programmable. >vi is my favorite editor, but it is not for everyone. I love vi because of the >speed it offers. vi, in general, offers the best response time I've seen, and ^^^^^^^^^^^^^^^ Compared to emacs (are there any choices in the UNIX world for editors other than vi and emacs? I am not asking for developing a new one. But does there exist an editor other than emacs/vi?) >eliminates the problem of taking my hands off the home row. I freely admit Then why don't the real typist/secretary types like this editor? What does UNIX land has to offer to these people? Some editor like XEDIT (under Xwindows) which requires some fancy/costly hardware and still makes one go through gazillion screens to repeat a search? >that a modal editor can be difficult to use, but I personally have never had a >problem with it. vi offers a limited macro capability in a similar vein to >PE2, except that the macros are defined by actual keystrokes, not >function-names. > However, since vi is built atop ex, the user has access to all >of the ex functionality. True, ex is getting to be quite obscure since most The problem I find with these editors is that the manuals are hard to get. One has to read the research papers that were written by the original authors etc. Why can't there be a reasonable and comprehensive manual with lots of examples? Talking about ex, one can use abbreviations to do a lot of good stuff but the ex macros (I am calling the abbreviations macros) are also key stroke dependent (like having to hit ctrl-v before inserting other control chars. into the macro.). Is there some way of getting parameters to the macros? Another problem which I have not solved yet is that while I am editing a file and want to change my function keys, can I run some other .exrc like file from inside the editor? I can do it the long way by typing in all the map commands but I think there must be a short cut to this. There must be, if these editors are as powerful as you claim them to be. It is definitely not exotic. >people never touch a teletype anymore (I said *most people*, no flames please). >However, if you're willing to spend the time to learn a few of its commands, or >have a master to teach you, then the power to be gained is very worthwhile. In >addition, vi offers regular-expression matching, which I've only found in one I do not have anything against reg.exps. The real problem is the insistence that what ever one has to do should be done only through reg.exps. There are other ways of doing this stuff. This like the history command in C-Shell. If you want to change even a teeny-weeny little character somewhere in the middle of the previous command, you start with a reg.exp. substitution. Don't you think it would much simpler just present the command in the input buffer and let the user change the portion he/she wants through cursor keys, spaces, delchar key etc. >probably). Another feature about vi is that the user can pipe parts of a file >through a filter. I want to do this. I have not yet figured out how I can pass a part of the file through a filter. I know how to do this for the entire file though. >prefer vi. Simply: I don't like lisp, I don't like running under an >interpreted (read: slow) environment, and emacs (GNU Emacs, that is) is both. ^^^^^^^^^^ I agree with you entirely. An editor should be the fastest piece of software because that is the primary link between a programmer and the computer. I have absolutely no sympathy for people who say that we have these 1001 features but my editor runs 100 times slow. >The ISPF editor is a very old editor, but still useful. However, given the May be you used the older version. IBM keeps on making improvements in a systematic way and documents everything. There is strict QC and you can be more or less assured about its reliability. What do vi and emacs have to offer in this area? Am I wrong in assuming that they have been basically developed by some grad. students? I also have a feeling that some of the computer science hacks are too caught up in their own little hacking tricks like named pipes or whatever and sneer at the users. Do you think that they would care too much about the poor typist/sceretary who has to use these tools? Now, on the otherhand, if they were to make money, they would put everything they have got into it. The popularity of emacs arises from it being a free-bee package than anything else. If one was paying some good $s for it, one would demand more. IBM sells ISPF for real $s and they spend enough money on research and continually improve their products. This is true with any company (be it Apple or DEC etc.). >opportunity, I'd still use XEDIT. I got the feeling this summer when I worked >at IBM that there's an ISPF vs. XEDIT religious debate in IBM mainframe circles >along the lines of the vi vs. emacs debate in UNIX circles. I met people over Actually the division is along many lines. It actually stems from the debate of MVS vs VM/CMS. I think that ISPF with VM/CMS is bad and same is true with XEDIT with MVS. I don't know why you got the impression that I am rooting for any one of these editors. I am merely saying that "Take the good things out of ISPF, out XEDIT, out of the other program editors and give them as standard features". Obviously one cannot do this because some of the features can be contradictory. So, what is the yard stick to be used? Keep the features that are used by 90% of the people for 90% of the time. Obviously, you need an enlightened set of users for this. So educate the users, write good manuals, have sensible defaults, be user friendly and be adaptive to user needs and go on making improvements. Obviously all these things would cost money. So "there is no free editor". >the summer who were amazingly proficient at ISPF, and I was continually >impressed with the little tricks they did. However, one major problem I have >ISPF is that it *always* shows sequence numbers. There's no way to turn them ^^^^^^^^^^^^^^^^^^^^^^^ I don't remember the exact command but you can easily disable these. These line numbers have several nice uses though. For one, the labels are displayed on these line numbers. Secondly, blocks are dellimited by putting in line commands in this area. All your labels are visible. I can think several nice things that are visible in the line area which is not used in vi at all. >off. Now, sequence numbers are fine for programming, but when I read mail >that's been written in 80 columns, 72 columns just aren't enough. Also, You can scroll horizontally to your hearts content and you don't have to use some 200 hundred fingers to do this (or write a mcro). >although ISPF provides a macro facility, I could never figure out how to >redefine keys to my heart's content. Finally, there's the fact that it runs on There is a problem. Keys cannot be redefined. But it is not such a big deal. >3270s. I have used a version for PCs, but it simply simulated a 3270-style >terminal. Hence, no scrolling. Don't get me wrong - I perfectly understand >the logic behind the 3720 terminal concept (screen-at-a-time). I agree that it >has modern uses, and is an efficient solution to some problems. However, as a >terminal running an interactive text editor, it *sucks*. In my humble opinion. >ISPF and XEDIT were built around that fact; I can only regret that if >character-at-a-time terminals had existed when they were written, the >state-of-the-art in interactive editors might be that much further along. You are totally wrong in this. Character-at-a-time terminals use old technology. They are the ones who do not have any sizeable buffer. If the OS (or some OS process) doesn't take it off its hands, the characters are lost. Every time you press a key, the entire interrupt sequence is invoked. Ever wonder why UNIX editors are so slow? >So, in summary, PE2 for users, vi (or emacs) for "power users". And if you're >screwed - er, I'm mean stuck with a 3270-style terminal, I'd go with XEDIT - ^^^^^^^ Yes I am screwed. I am stuck with vi and/or emacs and dumb esprit terminal which shows only 24 lines. >Flame-shield activated. >-- >/_ rob > /_ Fun things to do with UNIX (#72 in a series): Anil Joshi (flame away all you want. I am busy this week, but will scorch you back in January). -- "We are responsible for what we are. 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