Created
October 16, 2011 03:41
-
-
Save sontek/1290480 to your computer and use it in GitHub Desktop.
Convert a mako file to jinja2 in Vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:%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