I am constantly looking this up so I figured I would post it here in the tip section.
VI Search and Replace Commands
First occurrence on current line:
Globally (all) on current line:Code::s/OLD/NEW
Between two lines #,#:Code::s/OLD/NEW/g
Every occurrence in file:Code::#,#s/OLD/NEW/g
Code::%s/OLD/NEW/g
Very nice, thank you! I've thought about putting together a TotalPenguin vi Cheat Sheet. What do you think?
I think that would be a good idea. What format, PDF?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks