Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site bdaemon.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!hplabs!hao!nbires!bdaemon!carl From: carl@bdaemon.UUCP (carl) Newsgroups: net.unix Subject: Re: Non-equivalence of targets in vi Message-ID: <354@bdaemon.UUCP> Date: Tue, 21-Jan-86 13:28:00 EST Article-I.D.: bdaemon.354 Posted: Tue Jan 21 13:28:00 1986 Date-Received: Sat, 25-Jan-86 08:37:09 EST References: <1032@turtlevax.UUCP> Organization: Daemon Assoc., Boulder, CO Lines: 44 > All of the operators in vi can be used with nearly any target with count > modifiers: > > ... > > For example, "c2t," will change the text from the cursor position > until the character before the second comma. > > I say "nearly", because I can't seem to figure out how to do it with the > section targets [[ and ]]. Suppose I want to delete the next two sections > so that I could put them in a different place. You'd think that > > d2]] > > would be the natural way to express this action, but vi just beeps me. > I've also tried > > 2d]] and d]2] > > to no avail. Any suggestions? > -- > Ken Turkowski @ CIMLINC, Menlo Park, CA My apologies to all for my incorrect reply stating that this problem did not exist in versions 3.7 and higher. Not only does it exist, but the command: d]] cannot be repeated with dot (.). The clue may be in a footnote in "An Introduction to Display Editing with Vi", which reads: "The [[ and ]] operations require the operation character to be doubled because they can move the cursor far from where it currently is. While it is easy to get back with the command ``, these commands would still be frustrating if they were easy to hit accidentally." What we may have here is another example of a Berkeley UNIX program which tries to do things *for* the user but ends up doing it *to* the user. Again, I apologize for my earlier posting. Carl