Skip to content

Instantly share code, notes, and snippets.

@kdimatteo
Created January 23, 2015 21:41
Show Gist options
  • Save kdimatteo/fc2cb3d7726de60ff8f3 to your computer and use it in GitHub Desktop.
Save kdimatteo/fc2cb3d7726de60ff8f3 to your computer and use it in GitHub Desktop.
Convert {{#each foo in foos}} to {{#each foos as |foo|}} with this one weird Vim/sed trick:
:s/#each\s\v\zs(<\w*>)\sin\s(<(\w|.)*)>/\2 as |\1|/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment