Posted By

sanjivarunsahayamhotmailcom on 12/16/08


Tagged

search replace vim


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

ascarion


Search and replace in Vim


 / Published in: Other
 

Search and replacing all instances of some text within Vim

  1. :%s/searchterm/replaceterm/g
  2.  
  3. eg.
  4.  
  5. Search for the word "today" within the whole file and replace all occurrences of it with "tomorrow".
  6.  
  7. :%s/today/tomorrow/g

Report this snippet  

You need to login to post a comment.