Undocumented MS Editor Code Folding Keyboard Shortcut CTRL+=

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Undocumented MS Editor Code Folding Keyboard Shortcut CTRL+=

Post by jpuziano » Sun Feb 05, 2012 1:04 am

Greetings all,

I found out by accident that when in the MS editor and with my cursor inside a code-folded block of text... hitting CTRL + = (hold Control Key down and tap the equals = key)... will toggle code folding.

I did not know this feature existed and it is not mentioned in the Help File.

I find this keyboard shortcut handy - did anyone out there know about this?

Marcus, is this an undocumented feature? If so, please add it to the Help File entry on Code Folding.

I hope others find this useful...
Last edited by jpuziano on Tue Feb 07, 2012 5:50 pm, edited 3 times in total.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Sun Feb 05, 2012 1:26 am

Ctrl + - does nothing for me. Do you maybe have some other program on your computer that makes this happen?

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Sun Feb 05, 2012 3:07 am

Sorry JRL, I should have said CTRL + = (hold the Control key down and tap the equals = key). I just corrected my original post above.

Does CTRL + = work for you?
Last edited by jpuziano on Tue Feb 07, 2012 5:51 pm, edited 1 time in total.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Sun Feb 05, 2012 4:38 am

Nope.

But I started fooling around with key combinations and found that ALT + Home sets a marker and ALT + End returns to the marker. Don't know if its documented but it works on both my XP and Win7 machines.

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Sun Feb 05, 2012 8:41 pm

JRL wrote:Nope.
Your cursor must be positioned on a line that is already inside a code-folded block... such as on one of the lines in an If/Else/EndIf block. Tapping CTRL and the equals = key alternately folds/unfolds the block for me...
JRL wrote:But I started fooling around with key combinations and found that ALT + Home sets a marker and ALT + End returns to the marker. Don't know if its documented but it works on both my XP and Win7 machines.
Thank you! Many times when updating code, I am at a line that I need to return to. I am using Bookmarks a lot more these days as they persist between editing sessions... but again, this very quick "set a marker and return to the marker" feature you've discovered is going to be very useful.

At this point, I am not even sure if these are features of the MS editor or Windows itself... but either way, I do wonder what other keyboard shortcuts or features might be possible in the MS editor.

Does either of the above work for anyone else out there?

Marcus, do they work for you?
Last edited by jpuziano on Tue Feb 07, 2012 5:51 pm, edited 1 time in total.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Feb 07, 2012 10:32 am

Yes they work for me. I must admit I wasn't aware of these built in key commands. They are a feature of the syntax editor component we use.

You will find a list if you go to:

http://www.econtrol.ru/syntedit_help/fr ... index.html

Then select from Users Manual -> Editor -> Editor Commands

Then look under the shortcut column.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Dimmak
Junior Coder
Posts: 25
Joined: Tue Jan 24, 2012 4:57 pm

Post by Dimmak » Tue Feb 07, 2012 10:45 am

COOL... :shock:

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue Feb 07, 2012 5:47 pm

Thanks Marcus, there's a lot of new (new to us) functionality in keyboard shortcuts on that page... for example...

GOTO LINE NUMBER ALT + G

When one gets an error message with a problem on line number 1245, it would be nice to have a way to just jump to that line number. There is nothing in the MS editor menus to show me I can do that but hitting ALT + G will do it. Maybe that one should be added to the MS editor menu as its so handy.

JRL, the one you found also has a really handy swap feature (keep position, jump back)... I will definately use this:
Stack-based markers wrote: Id Const Short name Shortcut Description
430 smDropMarker Drop marker Alt + Home Drops marker to the current position
431 smCollectMarker Collect marker Alt + End Collect marker (jump back)
432 smSwapMarker Swap marker Alt + Shift + Home Swap marker (keep position, jump back)

And the one I found by accident was this...
the only entry in the 'Text folding' section that has a keyboard shortcut wrote:526 smToggleCollapseNearest Toggle Collapse Nearest Ctrl + = Collapse/expand nearest block

...so hold down the CTRL key and tap the equals = key (the SHIFT key is not involved)... does that work for you JRL?
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Feb 07, 2012 6:12 pm

...does that work for you JRL?
Yes it does. And I feel foolish for not having tried it without holding the shift key which causes it to fail. Out of curiosity, is that the key you were pressing, or were you pressing the + key at the number pad?

Marcus,
Thanks for the info. Very handy.

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue Feb 07, 2012 6:24 pm

JRL wrote:
...does that work for you JRL?
Yes it does. And I feel foolish for not having tried it without holding the shift key which causes it to fail. Out of curiosity, is that the key you were pressing, or were you pressing the + key at the number pad?
That was the key alright (not the + key on the numeric key). I should have said equals = ahh well...

On the bright side, it looks like this accidental discovery has just opened up a wealth of new functionality for all Macro Scheduler users - a whole bunch of MS Editor keyboard shortuts that no one knew existed... nothing wrong with that! :D
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Wed Feb 08, 2012 10:30 am

Is http://www.econtrol.ru a malicious website?
It's blocked by Malwarebytes Anti-Malware: 77.221.130.17.

Edit:
It could be a false alarm. Anyway I download the pdf manual. Thanks for the link.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Feb 08, 2012 11:04 am

Most definitely *NOT* malicious. We've used their component for a few years now and always get outstanding support from Michael.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts