Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!spool2.mu.edu!news.cs.indiana.edu!att!linac!midway!gargoyle!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.editors Subject: Re: vi for power users Message-ID: <1990Dec11.171724.4565@chinet.chi.il.us> Date: 11 Dec 90 17:17:24 GMT References: <110093@convex.convex.com> <1990Dec10.051430.12025@chinet.chi.il.us> <110178@convex.convex.com> Organization: Chinet - Public Access UNIX Lines: 56 In article <110178@convex.convex.com> tchrist@convex.COM (Tom Christiansen) writes: >>If you don't build it in, you are going to have a heck of a time figuring >>out the piece you want to manipulate in the other tool. >I will stifle my urge to preach much on tool philosophy again. If you >won't learn tools, you cripple yourself. Like using cc without lint. But you didn't address the point about how to pass the necessary info to the other tool. In the relevent case (manipulating arbitrary rectangles) you need 4 coordinates for the source of the block and one for the destination in the case of a move. If I have to count lines and characters I might as well just retype it in the first place. What I really wanted here was a set of macros to help with this, but perhaps even that can't be done without putting in-band markers into the text. >"Very good" may be too strong. If you can't teach your secretary the >following awkly method, you should consider replacing him with someone >more trainable, since I wonder what else they can't learn either. I know, >it sounds condescending again. The truth is, I've never once met a >secretary whom I couldn't teach this stuff to, and I have taught a good >number in my day. You've had a sheltered life. I have to deal with other people's secretaries where replacement is not an option, plus temps who already know word processing using word processing programs. I have taught some of them vi, but now that word processing programs handle everything except full regexp substitution I won't do it again. It's not a question of whether they can learn, but one of why they should spend time learning a less than optimal way to do something. > 1,10!awk -F 'print $1, $2, $3, $5, $4, $6' > >I'll bet your secretaries could handle this. Perhaps, but they shouldn't. When a tool exists that lets you mark the corners of the area and destination using normal editor motion commands and has a simple command syntax for the move, then the philosophy that says to use the best tool for the job must insist on using it. However, I didn't intend for this to become a flame against vi. I like vi for programming and uses where visual formatting is not important. I was hoping that someone would come up with a way to use vi itself to do those two operations (paragraph reform and rectangle manipulation). I do realize that arbitrary rectangle movement (slide a column down as well as over) would be pretty difficult, but perhaps someone could manage some macros for column swaps on the same line range like: :2,6s/\(...\)\(...\)\(...\)/\1\3\2/ so that you wouldn't have to count the lines and dots. Or maybe even something that would write some commands out to a tmp file and then :source it. Les Mikesell les@chinet.chi.il.us