vim
Hi all,
can anyone tell me is there any command in vi editor to "select all" other than typing number of lines and yy |
Try pressing V on your first line, then G to mark all text. Remember it is "V" and "G" not "v" or "g" ^_^;;
|
Oops sorry... that will not work on vi, because vi does not have visual mode. Now, if you are using vim (which is far better - pun indented), it should work.
Regards! |
If you want to do something like a search & replace over the entire document for example, use '%' for the range:
:%s/ thier/ their/g |
oh.. wow..:) its working....Thanks Mega Man X :)
and after marking with G i have to yank right ?? "yy" |
Np. Always a pleasure to help another Linux and Vim enthusiast :D
Regards! EDIT: oops. Yup, yank after. I can't test it now, but I think that if you yank, you will automatically leave visual mode. If you want to paste it, you will need to enter visual mode again (press v). i could be wrong though :) EDIT2: tested. You don't need to be on Visual mode to paste, once you've "yanked" |
to yank a whole file
yG edit sorry assuming you are at line 1. otherwise: 1GyG |
Thanks for all replies....:):)
|
Quote:
|
Quote:
I just started vi in my machine and pressed "v" and I get: "v isn't a vi command". |
All times are GMT -5. The time now is 06:04 PM. |