Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!texsun!convex!convex.COM From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.editors Subject: Re: vi for power users Message-ID: <110188@convex.convex.com> Date: 10 Dec 90 18:01:11 GMT References: <110093@convex.convex.com> <1990Dec10.051430.12025@chinet.chi.il.us> <17723@neptune.inf.ethz.ch> Sender: news@convex.com Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 39 In article <17723@neptune.inf.ethz.ch> wyle@inf.ethz.ch (Mitchell Wyle) writes: >and the fmt from uunet has BSD-isms in it, making it hard to port. Face it, >Tom. If you EDIT prose, you need a fmt function in your text editor. The >lisp and magic stuff are not so important, especially if you don't edit >lisp! But the lack of fmt is a glaring hole in vi. "need" is too a strong word. I would say "would very much like". My fingers whip off Meta-p *really* fast, and it comes back very nearly just as fast. I wouldn't say we all *need* it. On portability, the following functions need resolution after you compile fmt.c into its fmt.o: abs fclose fopen fputc ishead perror strcpy exit fgetc fprintf index malloc sscanf strlen I assume you know that index() is how we BSD folks pronounce strchr(), so a -Dindex=strchr on the command line will fix that if your system is monolingual. The inhead() function comes from usr.bin/mail/head.c, as the Makefile directs. Just what other functions here are bothering you? If you really want, I'll be glad to post a perl solution. :-) >1. Don't use vi to do tables; use sc(1). >2. If you have violated rule 1, you must resort to the regular-expression > stuff in the right-hand-side of a substitute (:s) command, or else bang > in the sed or awk script. (Awk would seem the optimal tool for that.) Well, I would say that tbl(1) is what you use to do tables, and that sc(1L) is for spreadsheet calculation. (Note the "L" part.) But I'll murmur general agreement here. --tom -- Tom Christiansen tchrist@convex.com convex!tchrist "With a kernel dive, all things are possible, but it sure makes it hard to look at yourself in the mirror the next morning." -me