Skip to content

Instantly share code, notes, and snippets.

@lucasrcezimbra
Last active February 9, 2017 19:59
Show Gist options
  • Save lucasrcezimbra/4d06be0012f4f105ee98a6da891eaf2c to your computer and use it in GitHub Desktop.
Save lucasrcezimbra/4d06be0012f4f105ee98a6da891eaf2c to your computer and use it in GitHub Desktop.
Vim Regex Find and Replace
Substitui:
<link rel="stylesheet" href="css/font-awesome.min.css">
por
<link rel="stylesheet" href="{% static 'css/font-awesome.min.css %}">
Find:
\(src\|href\)="\(\(img\|css\|js\)[^)]\{-}\)"
Replace:
s/\(src\|href\)="\(\(img\|css\|js\)[^)]\{-}\)"/\1="{% static '\2' %}"/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment