On 20-Aug-07 17:27:41, Clarke Echols wrote: > Ouch! That's painful! :-)
Perhaps it was only painful, Clarke, because I slung the whole parcel at you, with long explanations, all at once! Comparing with your procedure desribed below, what the user does with my "ge" script is 1. ge filename 2. Edit the groff sile. 3. When you want to see what it looks like, ":w" in vim; then have a look at the 'gv' window. 4. Either finish off with ":q" in vim, or go back to 2. Does that hurt a bit less? :) There's a lot of wise comment in what you said about "engineering". And I like you somments about Word. Puzzle for Word fanatics: quickly convert all instances of numbers (with decimal places and thousands separators) from "Continental" format: 123.456,78 to "Anglo-Saxon": 123,456.78 Vim solution: X 123.456,78 0,123 123.456.789 With the cursor at X: :.,$s/\([0-9]\),\([0-9]\)/\1#\2/g which gives X 123.456#78 0#123 123.456.789 With the cursor again at X: :.,$s/\([0-9]\)\.\([0-9]\)/\1,\2/g which gives X 123,456#78 0#123 123,456,789 With the cursor again at X: :.,$s/\([0-9]\)#\([0-9]\)/\1.\2/g which finally gives: X 123,456.78 0.123 123,456,789 The essence, of course, is that all, and only, "." and "," which are between digits must be changed. (I once did have to do this for whole chapters of a book in Word, which had hundreds of such numbers; and the only way I found was to do the same ","->"#", "."->",", "#"->"." strategy by a global replace of every ocurrence of the character to be changed, but with "confirm" switched on. That meant many thousands of on-the-fly decisions, all of which had to be right!) If it had been a plain-text, 'vim' would have done it in about 30 seconds. Best wishes, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <[EMAIL PROTECTED]> Fax-to-email: +44 (0)870 094 0861 Date: 20-Aug-07 Time: 19:18:44 ------------------------------ XFMail ------------------------------