Does anyone know of a vim plugin or script to convert special characters to their corresponding HTML
- by Alan
I develop websites for corporate clients, so we see the ®, ™, etc. chars a whole lot. Sometimes I paste in huge blocks of copy, which might even contain pretty quotes (“ ”) or other strange characters from word processors.
So, my question is this: Does anyone know of a vim plugin or script that can, in one fell swoop, convert all these characters to html entities?
I think this covers all the bases of the entities it would be nice to have:
http://web.forret.com/tools/charmap.asp
So, for the characters above, they would be replaced with ®, ™, “, ”, etc.
I tried the htmlspecialchars vimball (http://www.vim.org/scripts/script.php?script_id=2377), but no dice. It only performs its replacement like the PHP htmlsepcialchars function, replacing html-conflicting characters, and doesn't cover any additional special characters.