Macro to replace 'space' with underscore

Here are moved topics that violate forum rules.

Macro to replace 'space' with underscore

Postby Ivan on Thu Sep 07, 2006 10:06 pm

I would like to make a macro that upon pushing caps-lock replaces all space characters with underscores. It should stop replacing when either caps-lock is entered again or user pushes space bar.
Can someone give me some hints on this?
Ivan
 

Postby Gintaras on Fri Sep 08, 2006 5:38 am

Replace as you type, or replace in already existing text?
Gintaras
Site Admin
 
Posts: 10298
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Postby Ivan on Fri Sep 08, 2006 3:17 pm

As I type. I want to avoid holding shift down while typing long class names (required to be all caps by my company's coding standard). Thanks.
Ivan
 
Posts: 2
Joined: Fri Sep 08, 2006 3:13 pm

Postby Gintaras on Fri Sep 08, 2006 3:26 pm

ifk K 1 ;;if CapsLock is toggled
,key "_"
else
,key V



Assign Spacebar trigger.
Gintaras
Site Admin
 
Posts: 10298
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Postby Ivan on Fri Sep 08, 2006 4:39 pm

Thanks, that worked great.
Ivan
 
Posts: 2
Joined: Fri Sep 08, 2006 3:13 pm

Re: Macro to replace 'space' with underscore

Postby ssimop on Sun Apr 12, 2015 10:42 am

It it possible to replace as you type in already existing text (overwrite). I am primarily interested when in QM Editor. The Numpad "ins" key does not work. I wonder whether there exists a shortcut - escape sequence to do it. Many thanks in advance.
User avatar
ssimop
Active Member
 
Posts: 893
Joined: Sun Oct 21, 2007 1:55 pm
Location: Greece

Re: Macro to replace 'space' with underscore

Postby Gintaras on Sun Apr 12, 2015 10:53 am

Macro Macro2549     ?
SendMessage GetQmCodeEditor SCI.SCI_EDITTOGGLEOVERTYPE 0 0

Gintaras
Site Admin
 
Posts: 10298
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Re: Macro to replace 'space' with underscore

Postby ssimop on Sun Apr 12, 2015 11:11 am

Many thanks, again. Best regards!
User avatar
ssimop
Active Member
 
Posts: 893
Joined: Sun Oct 21, 2007 1:55 pm
Location: Greece


Return to Untitled

Who is online

Users browsing this forum: No registered users and 1 guest

cron