Replacing in vi

LordSnailz

Diamond Member
Nov 2, 1999
4,821
0
0
you mean search an replace or just replace at the cursor you're at?

to replace the character in your current position, hit 'r'.
if you want to search and replace, type :s/searchstring/replacestring/g
g searches the whole file ...

hope that helps,
 

GermyBoy

Banned
Jun 5, 2001
3,524
0
0
Originally posted by: LordSnailz
you mean search an replace or just replace at the cursor you're at? to replace the character in your current position, hit 'r'. if you want to search and replace, type :s/searchstring/replacestring/g g searches the whole file ... hope that helps,

Thanks a lot. I just realized I posted in the wrong forum.

I found a couple of references online for the vi text editor, but nothing really good yet. Where did you learn it?
 

LordSnailz

Diamond Member
Nov 2, 1999
4,821
0
0
work forces me to learn and use vi =( don't remember where I learned it from but I use it quick often so it was off the top of my head, a google search should get you some vi cheatsheets ...