Skip to content

Instantly share code, notes, and snippets.

@clarkli86
Last active June 18, 2016 06:49
Show Gist options
  • Save clarkli86/275c079f761b9229e6d0c1e1e912c940 to your computer and use it in GitHub Desktop.
Save clarkli86/275c079f761b9229e6d0c1e1e912c940 to your computer and use it in GitHub Desktop.
VIM macro to replace the html escaping
qa
:%s/&lt;/</eg // e is to skip 'text not found'
:%s/&gt;/>/eg
:%s/&quot;/"/eg
:%s/&amp;/&/eg
:%s/<<\(.*\)>\(.*\)<.*>>/<\2>/eg
q
// To replay on one file
@@a
// To replay on all buffers
:bufdo execute "@a" | write
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment