CFOG's PIP, December 1988, Volume 7 No. 6, Whole No. 68, page 99

More VDE Macros -- Changing Case

[I found this tip somewhere, but I cannot remember where. My thanks to the unknown author. -- bhc]

Here are three VDE macros that operate on single words to reverse the case from upper to lower or vice versa, as they would appear in the K(eys) section of VINST:

<7><Q>^^^[~ [
<8><Q>^[~ <^[0^^^[~ 0
<9><Q>^[~ <^D^D^[0^^^[~ 0

To enter Key 7, type:

CTRL-^ ESC ~ space [

[We have shown spaces between the characters for clarity: don't enter the spaces. -- bhc] It will reverse the case on everything from the cursor to the next space.

Key 8 is a little flashier. It reverses the case on every letter in a word, no matter where the cursor is. It is typed

ESC ~ space < ESC ~ space 0

Key 9 is even flashier. It reverses case on every letter in the word but the first, no matter where the cursor is. It is typed:

ESC ~ space < CTRL-D CTRL-D ESC 0 CTRL-^ ~ space 0

[That's all to be entered on one line: it just won't fit on one line here. -- bhc]

You enter Q when VINST asks you whether the macro is to be quiet or non-repeat. The <Q> is entered by VINST. If you normally work in insert mode, precede each definitions with CTRL-V.