A couple of handy search-and-replace functions for Vim that: -
- convert unicode characters to their repspective named HTML entities
- convert named HTML entities to their unicode codepoint equivalents
- 1.0 - Initial Version
Save yourself a lot of hassle and install Tim Pope's excellent Pathogen plugin to manage your Vim scripts.
Clone the github repository into your VIM/bundle directory. Or else add it as a git submodule to the same place.
Copy html_entities_helper.vim into your VIM/plugin directory and restart.
Before: © Copyright 2011 · All Rights Reserved.
After: © Copyright 2011 · All Rights Reserved.
Before: © Copyright 2011 · All Rights Reserved.
After: © Copyright 2011 · All Rights Reserved.
Currently conversions are across the entire current Vim buffer, future version will work on a visual selection but if you need to work on a sub section of a buffer in the meantime copy it to a new buffer, convert and paster back in.