Xref: utzoo comp.misc:5534 comp.editors:555 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!indri!nic.MR.NET!eta!com50!pwcs!stag!trb From: trb@stag.UUCP ( Todd Burkey ) Newsgroups: comp.misc,comp.editors Subject: Re: UNIX needs a real text editor Message-ID: <745@stag.UUCP> Date: 16 Mar 89 16:46:56 GMT References: <222@imspw6.UUCP> <252@torch.UUCP> <2112@mister-curious.sw.mcc.com> <743@stag.UUCP> Reply-To: trb@stag.UUCP ( Todd Burkey ) Organization: Mindtools ST Access Group, Plymouth, MN Lines: 70 In article gaynor@athos.rutgers.edu (Silver) writes: > >`Folding', in your sense, is a way to arbitrarily selectively displaying >portions of a buffer? It's in GNU, and is extremely useful. (GNUsers, note >the function narrow-to-region and the variable selective-display.) > Unfortunately, folding in GNU, as you are referring to it, isn't much use (unless things have changed drastically in a newer version of GNU Emacs than I have). Folding really becomes useful when all the things you have folded are carried across between edit sessions and when all the 'commands' in the editor really 'understand' folding. For example, I normally keep all my comment blocks folded away, plus any sections of code that I am not currently working on. During block/line copies or moves, things that are folded will remain folded, even if they are moved to other buffers or even into the trashcan. If I fold a block of text or an indented region, I can insert several spaces in front of the resulting 'highlighted' text line, unfold the line and see the entire block shifted to the right by that number of spaces. With a single keypress, I can temporarily unfold everything to perform searches or global substitutions, and then refold everything with another single keypress. And there are many endcase things the editor ends up worrying about (going to marks/relations that are inside of folded text, keeping track of heirarchical folds, etc). At one time I looked at creating a 'map file' for GNU Emacs to use to control folding, but things got just too hairy. And since I didn't like the idea of embedding special characters inside of my source files to 'help out' the editor, I ended up writing FOLDED to see how useful true folding would be and what the ramifications folding had on editor operations. As a result of going through this 'exercise', I do feel that some major changes to the current two big editors (vi and Emacs) would be required to allow incorporation of true folding (and relational features for that matter). From a programming editor viewpoint (note that I said programming, not programmable), I tend to rank editors as follows: vi <-> assembly code...small, fast, concise, and confusing as hell unless you are a vi guru (I get by)...but it comes free with every system. emacs <-> basic...big, slow, but you can do a lot of reprogramming around the rich command set...note that this is interpreted tokenized basic, not compiled. pc-eds<-> forth...smaller, faster, and more application specific editors, some of which are heavily integrated into their respective C, Pascal, Occam, Assembly environments. These editors usually get written for the PC market (where the money is) and later get moved in some form back to Unix (either as a package or emulated under emacs). cased <-> C...a higher level (case) editor that allows truly compiled-in modules and integrates nicely into the environment. This editor would be both programmable and extensible (i.e you can not only program based on the current libc.a, but you can also develop your own low level routines if you need to). Unfortunately, I still haven't found such an editor. My folding editor probably falls back under the realm of the pc-eds, since it doesn't have a user-programming layer. Several people have sent me mail under the assumption that my editor is programmable, probably because I call it a programming editor. It is NOT programmable. My first goal in developing the editor was to put the features of various editors that I liked into the heart of the editor itself. At a later date, I may look into allowing C modules to be linked into the editor (i.e. compiled macros), but that will require some heavy duty restructuring and 'fool-proofing' of the editor itself...not to mention some heavy duty learning on my part. -Todd Burkey trb@stag.UUCP