Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!uunet!ncrlnk!ncrstp!npdiss1!mercer From: mercer@npdiss1.StPaul.NCR.COM (Dan Mercer) Newsgroups: comp.editors Subject: Re: vi Alternative Required Message-ID: <770@npdiss1.StPaul.NCR.COM> Date: 11 Dec 90 17:43:22 GMT References: <1616@ukpoit.co.uk> <7471@castle.ed.ac.uk> <550@newave.UUCP> Reply-To: mercer@npdiss1.StPaul.NCR.COM (Dan Mercer) Organization: StPaul Lines: 84 In article <550@newave.UUCP> john@newave.mn.org (John A. Weeks III) writes: :In article <1616@ukpoit.co.uk> ian@ukpoit.co.uk (Ian Spare) writes: :> Some of our users/developers have formed a lynch party and came into the :> tech support area this morining spoiling for a fight !!! They ( not me ! ) :> feel that vi is hopeless and would like a better editor ( their words ). : :I have heard that brief and wordstar are far superior to "vi". After all, :vi is not even DOS compatible. I suggest that do the following: : : cp /bin/vi /bin/wrdstr : :Then open the file "vi.doc" (or what ever your online editor help file is) :and run the following vi command ":%s/vi/wrdstr/g". Finally, mail a message :to everyone telling them that the new and improved wrdstr editor has been :installed on the system. : :This should fix any complaints about vi ;-). Then go back to doing :something productive with your limited time (or go out for doughnuts). : :-john- : This, of course, will not work, for wrdstr will actually come up in ex mode. Observe the ls -il of /usr/bin: 666 -rwxr-xr-x 5 bin 147528 Jan 6 1989 edit 666 -rwxr-xr-x 5 bin 147528 Jan 6 1989 ex 666 -rwxr-xr-x 5 bin 147528 Jan 6 1989 vedit 666 -rwxr-xr-x 5 bin 147528 Jan 6 1989 vi 666 -rwxr-xr-x 5 bin 147528 Jan 6 1989 view ex examines argv[1] to determine which mode to come up in. The default [non-match] is the original, ex. As for the original question, when I was first introduced to UNIX 5 or 6 years ago, after years of editing on TSO/MVS, I too was daunted by vi. Our entire group went to management after first getting our UNIX system and begged for a 'better' (i.e. different) editor. While we searched for a different editor, we started grudgingly to learn vi. After a week, we were still complaining. After two weeks, we had discovered some of the interesting things that can be done and we cancelled looking for another editor. After three months, we had totally scrapped the custom built user interface we were designing in favor of an interface built entirely around vi (drop down menus, calls to other programs, all communicating across FIFOS). We did our original UNIX programming on an Amdahl UTS system with its 'ned' editor that allowed for the importation of skeletons. I liked that feature so well that I built my own version linked across an input and out FIFO. A function key causes the current line to be written to the input FIFO and then reads the output FIFO. vi blocks on the read and the background processes unblocks on its read of the input FIFO, gets the current line, pattern matches against a database and if it finds no hits, pattern matches against the lintlibs. It formulates the response, either a skeleton or the lintlib line and writes that to the output FIFO. In the blink of an eye te patterns in my file ready to edit. The other thing I loved about vi was its interaction with the shell. Building a quicky awk program in the file then feeding it to the shell is great for building arrays (character translation, CRC checking, etc). Of course, I'm a hacker. There were four people in our group - two hackers and two plodders. The plodders didn't even know how to to global substitutions and refused to learn. Used to irritate the hell out of me watching them plow through a file and change everything by hand. Of course, they'd never really learned to use the ISPF editor, either. The code they wrote was pretty bad, too. Vi is really a programmer's editor. The better the programmer, the better one likes vi. Actually, the average person needs only the most rudimentary editor to do his/her work. This may explain why so much programming is so average. We did find an SPF style editor for UNIX - try looking through 5 year old copies of UNIX World. I've looked through recent copies, but no luck. They may be out of business. -- Dan Mercer NCR Network Products Division - Network Integration Services Reply-To: mercer@npdiss1.StPaul.NCR.COM (Dan Mercer) "MAN - the only one word oxymoron in the English Language"