>Hi, i'm trying to replace all occurrences of characaters like é, è, ê >etc ... by their corresponding htmlentities. To do that, i use the >following command: >%s/é/\é/g
>The problem with that command is that i have to do that for all >characters. I was wandering if there's a way to do it with only one >command. Honestly, the way I'd do it is to just throw it at 'sed' (simple but constant multiple substitutions), or write a little 'lex' script (more onvolved, with reformatting, rearranging, whatever else needs to be done to the doc), depending on how involved it is and how often I'd need to use it. I've got DOS versions of both, which is what (still) I tend to use on Lose systems. As for 'vim', it's probably best to write a function which you could map to a single key like one of the F-keys. I'm still new at that, so couldn't tell you how to do that, but certainly someone here can tell you how to build the skeleton of the function; you'd add salt and pepper to taste. Then you'd just open up a doc, hit <F9> or something, and it's magically done in one pass. Don't have it here, but did write a few cheapo 'lex' scripts to turn 0xA0 to " ", convert and match ldquo/rdquo/lsquo/rsquo chars, ellipses, most of the common things I encounter. Gimme a yell today and I tomorrow can dig up and post the script here (if anyone else is interested) or via email directly.
