Xref: utzoo comp.misc:5529 comp.editors:551 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!milano!mister-curious!loo From: loo@mister-curious.sw.mcc.com (Joel Loo) Newsgroups: comp.misc,comp.editors Subject: Re: UNIX needs a real text editor Summary: Nice features of vi and suggest extensions Message-ID: <2125@mister-curious.sw.mcc.com> Date: 16 Mar 89 17:14:20 GMT References: <222@imspw6.UUCP> <252@torch.UUCP> <2112@mister-curious.sw.mcc.com> <743@stag.UUCP> Organization: MCC, Austin, TX Lines: 113 In article <743@stag.UUCP>, trb@stag.UUCP ( Todd Burkey ) writes: > > ... I was a 'macro' fanatic, even putting up with > the incredibly slow operation of emacs on my IBM PC just to have the > same macros running there. I was a macro fanatic and still am but I am also wiser now not to go for every 'nice' thing. Yes, I think vi is deficient in macro creation power. It does not have a proper macro language. You can't even have if-then-else (or am I wrong?). For the issue of extremely programmable editors, perhaps we can find an analogy in the language Forth. I was a Forth fanatic few years back because it claims to be "an assemble, compiler and even a compiler-compiler." It even "encourages the user to modify its syntax." Sound like a good idea? But this is also the same reason I abandoned Forth. Everybody can has his own Forth language (or languages) even if they started from the same Forth standard. I had difficulties maintaining the few applications and routines I developed because syntax varies. A way round this is to have _standards_ frozen along the course of history. Eg. Postscript and NeWS more or less are frozen Forth dialects/variants. Back to programmable editor. The success and popularity (among those who can behold its beauty) of vi might be because of its non-programmabilty. The philosophy might be stated as: vi provides the necessary features for daily programming chores; it encourages only short user macros so that all vi's behave in more or less the same way; if you want to do more than what you can with vi, look to other unix tools (sed, awk, or even lex and yacc) - vi has a hook to these tools. So, programmability of editors -- tough decision. > ... Unfortunately, vi doesn't handle > multiple buffers in a very usable way (almost as if multiple buffers > were an afterthought during the development of vi). Agree. Only two file buffers are available in vi. At a closer look they are not buffers at all, they are mere illusions. There are other buffers though, the text registers. The registers are, I suspect, hardly used by users, even experts. The reason: too many keystrokes are required to make use of them. I only use them in macros. vi should have better multi-buffering capability. > ... Last November I started writing an editor in my > spare time, just to see how hard it would be to add a thought > processor-like folding concept to an editor. Great! Hope to see you post your editor soon. > How do other programmers/hackers out there feel about the need for > higher level programming editors/tools? I am not too sure what you meant by "higer level". But if it is what I perceived, then, yes, there is a need. A feature like Emacs' "mark the next Sexp" is more civilized to than: "mark beginning, move, move, move ... mark ending". In vi: "ctK" (change to the char 'K') is more civilized than: "del, del, del ... (oops! overshot) undo, undo, (ahhh), type, type, type, type" The important auto-indentation feature (for C and Lisp) are lacking in vi. (Or is there a unix tool to do that?) Even higher level features (which I can't imagine at the moment) can be included. > ... Are you completely happy with > your current editor, so things like folding and inter-file > relationships aren't really of any foreseeable use? Happy, yes. But not _completely_. Folding and interfile relationships would be useful if they are elegant and not confusing. I said 'not confusing' because I have the bad experience of throwing out when I saw a imbecile context-sensitive editor for Pascal, they are for imbecile novice. It has remarkably poor implementation of folding and expansion which work at the moment and location which you least expect. > ... Is moded vs. > non-moded really the issue between editors, I like the moded nature of vi. Modes are good for expert users, allowing them to do things faster. The feeling I get from not having to type control keys to move around is really nice. I have grown out of using the arrow keys too. They are too far away to be reached and thus using them would slow down editing. Using 'hjkl' for movement is great, lots of unix games use the same movement keys too. So I am not sure modeless editors can beat vi in this respect. One last thing: do not force the user to use mouse. Give him the option of using the keyboard too. PS. Did someone mention vi emulation for Emacs? Where can I get it? :-) In fact I was about to write one for Zmacs but changed my mind because my Lisp machine project ended. -------------------------------------------------------------------- Joel Loo Peing Ling composed on Thu Mar 16 10:45:16 CST 1989 -------------------------------------------------------------------- MCC | Email: loo@sw.mcc.com 3500 West Balcones Centre Dr. | Voice: (512)338-3680 (O) Austin, TX 78759 | (512)343-1780 (H)