Article View: wwa.support
Article #39Re: VI question
From: Oleg Ostrozhansky
Date: Sun, 17 Dec 1995 00:00
Date: Sun, 17 Dec 1995 00:00
59 lines
2372 bytes
2372 bytes
Hello Bob, In article <4b1d02$nq@kirin.wwa.com>, Bob Zimmerman <bobzim@wwa.com> wrote: >I've been using VI for well over a year know and it is >my editor of choice (that could say something good >or bad about me I guess)... > >But there has always been a couple of items I would >search help for and can't seem to find and I finally >decided to ask my local neighberhood before I track >down the misc.editor (or whatever) newsgroup :) > >a) Whenever I yank to a bookmark (e.g.) I mark >the begining of some text I want to duplicate by >pressing mm in command mode, then move to the >end of that section and do a > >y'm > >to yank it... The cursor always moves to the mm >location :( Since I am duplicating the lines, >I want it to stay right where it was so I can >do the "p" thing :) Use '' (single quotation mark twice) to get the cursor back where it was, then paste. >Any ideas how to yank it without the jumping >or an easier "dupe" it way to do it... > >b) (the only other question :), is how to >repeat the last action, regardless of what it was. > >I know that "n" repeats the last find and ";" repeats >the last semi-colon... > >I find I do alot of /pattern, then a cw to change the >word I found... A dot in command mode repeats last action. If you do cw, then type the substitution, then escape back to command mode, you can move cursor to another word, type . and that word will be replaced. >I would like to repeat this manner... I don't want >to do a :%s/pattern/ etc... because... >how do I have it prompt me for each one (each >change) to determine if it "should" do it (sort of yes/no) >for each find... Use /c (for "confirm") at the end. E.g. :%s/mcs/wwa/gc :-) Hope this helps. 01eg --- Oleg Ostrozhansky oleg@mcs.com ostrole@charlie.acc.iit.edu http://www.mcs.net/~oleg/ Oleg_Ostrozhansky@email.mot.com
Technical Details
Message-ID:
<4b1noe$jdm@Venus.mcs.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<4b1d02$nq@kirin.wwa.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d5fa,135d326921a99a65 X-Google-Attributes: gid10d5fa,public X-Google-Thread: 10065a,135d326921a99a65 X-Google-Attributes: gid10065a,public From: oleg@MCS.COM (Oleg Ostrozhansky) Subject: Re: VI question Date: 1995/12/17 Message-ID: <4b1noe$jdm@Venus.mcs.com> X-Deja-AN: 122103087 references: <4b1d02$nq@kirin.wwa.com> organization: MCSNet newsgroups: wwa.support,chi.internet