Vi find and replace in


/ Published in: Bash



Copy this code and paste it in your HTML
  1. First occurrence on current line: :s/OLD/NEW
  2.  
  3. Globally (all) on current line: :s/OLD/NEW/g
  4.  
  5. Between two lines #,#: :#,#s/OLD/NEW/g
  6.  
  7. Every occurrence in file: :%s/OLD/NEW/g

URL: http://www.felixgers.de/teaching/emacs/vi_search_replace.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.