Skip to content

Instantly share code, notes, and snippets.

@adelarsq
Created February 14, 2015 11:51
Show Gist options
  • Save adelarsq/718e51e1c84e7edf31f0 to your computer and use it in GitHub Desktop.
Save adelarsq/718e51e1c84e7edf31f0 to your computer and use it in GitHub Desktop.
Auto incrementing pattern matching
let g:I=1
%g/^- id: \d\+$/ s/\d\+/\=g:I/|let g:I=g:I+1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment