Skip to content

Instantly share code, notes, and snippets.

@trapp
Created August 10, 2011 12:25
Show Gist options
  • Save trapp/1136682 to your computer and use it in GitHub Desktop.
Save trapp/1136682 to your computer and use it in GitHub Desktop.
Vi replace guide
First occurrence on current line: :s/OLD/NEW
All occurrences on current line: :s/OLD/NEW/g
Between two lines #,#: :#,#s/OLD/NEW/g
Every occurrence in file: :%s/OLD/NEW/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment