Topic: Toggle Case (1 of 4), Read 43 times, 1 File Attachment
Conf: VEDIT User Applications
From: Ian Binnie
Date: Monday, December 13, 2004 07:45 PM

For a long time I have wished for a Vedit macro which toggles the case of words similar to Microsoft Word Change Case shortcut Shift+F3.

It has always seemed too hard, or I have been too busy, but I have been doing a lot of this lately so I decided to bite the bullet.

There does not seem to be an easy way to test the case of a block in Vedit, but I have devised a way to do this.

Suggestions welcome.

 
TOGGLECASE.VDM (1KB)

 


Topic: Toggle Case (2 of 4), Read 42 times, 1 File Attachment
Conf: VEDIT User Applications
From: Christian Ziemski
Date: Tuesday, December 14, 2004 03:32 AM

Ian:

I added some lines to your macro to let it toggle all words in a marked block (and not only the first one) to Caps.
So it behaves like MS-Word.

Christian

 
TOGGLECASE(1).VDM (2KB)

 


Topic: Toggle Case (3 of 4), Read 41 times, 1 File Attachment
Conf: VEDIT User Applications
From: Ian Binnie
Date: Tuesday, December 14, 2004 10:26 PM

On 12/14/2004 3:32:26 AM, Christian Ziemski wrote:
>Ian:
>
>I added some lines to your
>macro to let it toggle all
>words in a marked block (and
>not only the first one) to
>Caps.
>So it behaves like MS-Word.
>
>Christian

I didn't do this because I like to keep the cursor position (and because I would't use it often), but it seems a worthwhile addition, so I added some code to restore the cursor.

I also got it to clear macro defined block markers - this makes it more like Word, and stops me from accidentally deleting words.

 
TOGGLECASE(2).VDM (2KB)

 


Topic: Toggle Case (4 of 4), Read 34 times, 1 File Attachment
Conf: VEDIT User Applications
From: Ian Binnie
Date: Saturday, April 02, 2005 09:10 PM

I was frustrated that the previous macro would not toggle to Caps Case for text in quotes, although it would do so for all but the first word in a user selected block (Christian's improvement).

The attached overcomes these limitations.

I assign this to a keystroke macro Shift+F3

 
TOGGLECASE(3).VDM (2KB)