次のようなDjangoテンプレートのいくつかのインスタンスを変更する必要があります。
{% block content %}{{ mycontents }}{% endblock content %}
これに:
{% templatetag openblock %} block content {% templatetag closeblock %}{% templatetag openvariable %} mycontents {% templatetag closevariable %}{% templatetag openblock %} endblock content {% templatetag closeblock %}
これを行うためにfind-and-replaceコマンドを作成するにはどうすればよいですか?私は通常、この種のことのためにVimを使用しますが、他の選択肢もあります。