Thread View: wwa.support
6 messages
6 total messages
Started by Bob Zimmerman
Sun, 17 Dec 1995 00:00
VI question
Author: Bob Zimmerman
Date: Sun, 17 Dec 1995 00:00
Date: Sun, 17 Dec 1995 00:00
46 lines
1997 bytes
1997 bytes
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 :) 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... 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... TIA ... (p.s. I use Coderight for Windows - my office standardized on this editor for development and it has vi built into it... - Anyone have other alternatives - shareware or commercial - that has full implementation of VI for Win 95?? TIA squared... :)
Re: VI question
Author: Bob Zimmerman
Date: Sun, 17 Dec 1995 00:00
Date: Sun, 17 Dec 1995 00:00
19 lines
1151 bytes
1151 bytes
oleg@MCS.COM (Oleg Ostrozhansky) wrote: > >Use '' (single quotation mark twice) to get the cursor back where >it was, then paste. That seems to only work if I used a jump command... When I do the y'm and then '' it won't take me back to where I was ... :( ----- Bob Zimmerman ~ bobzim@metaworld.com ~ http://sashimi.wwa.com/~bobzim/ Ask me about Grep For Windows, or get it from my WWW page MetaWorld ~ PO Box 261 ~ Grayslake, IL 60030 info@metaworld.com ~ http://www.metaworld.com ~ (708) 223-6753 Internet Consulting, Training and Support World Wide Web Design and Consulting
Re: VI question
Author: Bob Zimmerman
Date: Sun, 17 Dec 1995 00:00
Date: Sun, 17 Dec 1995 00:00
22 lines
1475 bytes
1475 bytes
dattier@sashimi.wwa.com (David W. Tamkin) wrote: >As Oleg said, you can use `` to go back when that happens, but instead of >doing that and then using p to add a copy at the end of the original, just >stay where you are and use P to paste in a copy of the default buffer before >the original. Either way you end up with two consecutive appearances of the >same text, which is what you want. DUH! (smiling) thanks.. that'll do exactly what I am looking for (not sure why it didn't occur to me since I always use the yyP to evelope lines with another ... Thanks (as usual) ... :) ----- Bob Zimmerman ~ bobzim@metaworld.com ~ http://sashimi.wwa.com/~bobzim/ Ask me about Grep For Windows, or get it from my WWW page MetaWorld ~ PO Box 261 ~ Grayslake, IL 60030 info@metaworld.com ~ http://www.metaworld.com ~ (708) 223-6753 Internet Consulting, Training and Support World Wide Web Design and Consulting
Re: VI question
Author: 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
Re: VI question
Author: David W. Tamkin
Date: Sun, 17 Dec 1995 00:00
Date: Sun, 17 Dec 1995 00:00
39 lines
1985 bytes
1985 bytes
bobzim@wwa.com (Bob Zimmerman) wrote in <4b1d02$nq@kirin.wwa.com>: | 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 :) | | Any ideas how to yank it without the jumping ... Whenever you yank, the cursor will end up at the beginning of the yanked area. If the mark was below the cursor when you issued the yank command, yanking won't move it at all. | ... or an easier "dupe" it way to do it... As Oleg said, you can use `` to go back when that happens, but instead of doing that and then using p to add a copy at the end of the original, just stay where you are and use P to paste in a copy of the default buffer before the original. Either way you end up with two consecutive appearances of the same text, which is what you want. | 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... Uh, ; repeats the last F, f, T, or t, and , reverses the last F, f, T, or t. N reverses the last search. . (the period) repeats the last *change*. It will not repeat the last movement, for example.
Re: VI question
Author: Ben Liberman
Date: Sun, 24 Dec 1995 00:00
Date: Sun, 24 Dec 1995 00:00
19 lines
1125 bytes
1125 bytes
In article <4b1d02$nq@kirin.wwa.com>, Bob Zimmerman <bobzim@wwa.com> wrote: >I've been using VI ... >I find I do alot of /pattern, then a cw to change the >word I found... > >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... After using /pattern to find pattern, just using / will search forward for the next occurance and using ? will search backwards. -- ------------ ----------- Ben Liberman ben@mcs.com ben@bl.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads