Thaidog
asked on
What is the vim command equiv to: sed -i 's/something/something_else/g'
When inside vim, what is the ex command equiv to: sed -i 's/something/something_els e/g'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You could also replace the "1,$" with a single "%"
:%s/something/somthing_els e/g
:%s/something/somthing_els
@serialband - That is exactly what farzanj suggested in http:#a38308745 - please read earlier comments :)
I did read the earlier comment. I added a different syntax which reduces 2 keystrokes that did the same thing. If you need to search& replace a lot of text, fewer keystrokes are better, at least it is for me.
gerwinjansen is right. I don't see any two character difference:)
Maybe your fonts show the percent sign too large so you see it as 3 characters? :P O/o
http://vim.wikia.com/wiki/Search_and_replace
http://michaelgoerz.net/refcards/vimqrc.pdf