Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut to comment selected code in SAS Guide

is there some shortcut to just comment the selected code in SAS Enterprise Guide?

There is Ctrl + / to comment the selected line. But would be really useful to comment just a selected part of the code.

Thanks.

like image 837
Ana Ferreira Avatar asked Mar 17 '16 16:03

Ana Ferreira


2 Answers

You can create a Keyboard Macro for this (Program > Editor Macros > Macro...), as shown below. Only limitation is that the selection must be made from left to right / top to bottom. A workaround would be to use instead Cut selection, inserting /*, Paste from clipboard and inserting */. Drawback this time is that you'd lose previous clipboard content.

Edit Keyboard Macro - Comment Selected

Then, just assign it a keyboard shortcut, like CTRL-SHIFT-C for instance.

[EDIT]

While we're at it, here's another one to uncomment the blocks enclosed by /* and */:

Edit Keyboard Macro - Uncomment block

For this one, I assigned the keyboard shortcut CTRL-SHIFT-D.

like image 165
Dominic Comtois Avatar answered Oct 11 '22 11:10

Dominic Comtois


Tested and working in SAS EG 7.1.

Program > Editor Macros >MAcros > Record new

You can either follow the sequence in the right side of the snap or create that using the options provided by SAS in left side.

enter image description here

like image 40
cc3125 Avatar answered Oct 11 '22 09:10

cc3125