django template with vim: replace static references in html
Using more elegant option {% static "my_file" %}. See https://docs.djangoproject.com/en/1.8/howto/static-files/
To replace all instances os src="http://coderwall.com/img/my_image.jpg"...
:%s/src="http://coderwall.com/(./%7B-%7D/)"/src="http://coderwall.com/%7B%%20static'\1' %}"/g
To replace all instances os href="http://coderwall.com/css/my_style.css"...
:%s/href="http://coderwall.com/(./%7B-%7D/)"/href="http://coderwall.com/%7B%%20static'\1' %}"/gWritten by javier wilson
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Templates
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#