Is there a way in vi to replace all occurrences of a string with another string? Such as:
DEPAR with DEPARTMENT
??
Replace all strings with vi
Started by Prog, Feb 15 2008 05:49 AM
2 replies to this topic
#1
Posted 15 February 2008 - 05:49 AM
|
|
|
#2
Posted 15 February 2008 - 09:45 AM
This works in Vim, but I think it'll work in Vi too.
:%s/DEPAR/DEPARTMENT/g
#3
Guest_Jordan_*
Posted 19 February 2008 - 05:49 PM
Guest_Jordan_*
v0id's suggestion works on vim as well as vi. Most Linux systems now use an alias for vi and actually execute vim when you type vi. After all, vim is only vi improved.


Sign In
Create Account


Back to top









