Skip to content

Instantly share code, notes, and snippets.

@sontek
Created October 16, 2011 03:41
Show Gist options
  • Save sontek/1290480 to your computer and use it in GitHub Desktop.
Save sontek/1290480 to your computer and use it in GitHub Desktop.
Convert a mako file to jinja2 in Vim
:%s/${\([^}]*\)}/{{ \1 }}/g
:%s/% if\([^:]*\):/{% if\1 %}/g
:%s/% endif/{% endif %}/g
:%s/% else:/{% else %}/g
:%s/% for\([^:]*\):/{% for\1 %}/g
:%s/% endfor/{% endfor %}/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment