Skip to content

Instantly share code, notes, and snippets.

@andermoney
Last active December 14, 2015 19:58
Show Gist options
  • Select an option

  • Save andermoney/5140167 to your computer and use it in GitHub Desktop.

Select an option

Save andermoney/5140167 to your computer and use it in GitHub Desktop.
Vim command to find and replace in a file with an incrementing number. In this case replaces ASN000 with ASN1, ASN2, etc
:let i=1 | g/ASN\d*/ s//\="ASN".i/ | let i+=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment