I have a template.php file where I want to change every occurence of apple with grape throughout the file. At the moment,I am having to painstakingly edit the entire file to find where to change. Sometimes the name is like this in the file, apple_button and sometimes it is just apple.I am using vi to edit.
Replace string with another string in vi editor
vim;vi
Open the file template.php using vi editor. After opening it, press escape button and type below. :%s/apple/grape/g