BookmarkSubscribeRSS Feed
0 Likes

From SAS Code, there should be a command button (kindly see attached) that when you highlight a specific text, you can automatically convert the selected text into comment. No need for SAS programmers to put in "/*..*/" for multiple line comments or "*/" for single line comment. This will speed up their work.

4 Comments
SuryaKiran
Meteorite | Level 14

Hello,

 

Not sure if your aware, there are shortcut keys for that. Ctrl+/ --> Add comment to selection and shift+Ctrl+/ to uncomment.

Reeza
Super User

On SAS Studio it's CTRL + / to toggle comments in either direction.

 

Here's the full list of keyboard short cuts:

 

https://support.sas.com/documentation/cdl/en/webeditorug/68828/HTML/default/viewer.htm#keyboardshort...

DellPogie
Fluorite | Level 6

It worked!! I'm just a newbie here and I don't even know that shortcut command exists. I believe it would be more friendly for the user if there is command button like this (just thinking out of the box). Otherwise, if CTRL+Z will do the undo then there is no need to have an undo button from SAS code UI.

ballardw
Super User

@DellPogie wrote:

From SAS Code, there should be a command button (kindly see attached) that when you highlight a specific text, you can automatically convert the selected text into comment. No need for SAS programmers to put in "/*..*/" for multiple line comments or "*/" for single line comment. This will speed up their work.


You can't use any of the keystrokes that the operating system preempts, such as ctrl-z. And ctrl-z may not be able to "undo" because your last action may involve lots more than you know and the operating system doesn't allows "know" what is going on inside an application. The individual programs have to make ctrl-z functionality work and for some things it may not make sense.

 

In the Display Manage, or Base or Foundation SAS you have several options for customizing the Enhance Editor.

One way: From the enhanced editor window select Tools>Options>Enhanced Editor Keys. This will bring up a window that will allow you to examine editor commands, by command category using that drop down menu, the available command and any associated keys currently assigned. If you don't like the current key assignment then you can change by highlighting the command and click on the Assign Keys button. Many possible commands do not have a default key assignment and you will find that commands like "Mover cursor down a page" in the Navigation category will have the key "Page Down" assigned.

 

One of the categories is User Defined where you can assign key strokes for editor macros (NOT be confused with SAS Program macros) to do multiple things and allows assigning a single key stroke to cause all of the commands to execute. You can create macros to run multiple key strokes by using Tools>Keyboard Macros>Record, to the actions and then use Tools>Keyboard Macros>Stop recording.

 

 

There are also KEYS windows, default is F9 that allows assigning certain types and sequences of SAS window commands, such as F5 F6 and F7 to move from log, output or editor to one of the others, or F8 that submits programs. Almost anything that can be typed in the COMMAND box can be attached to a Keys entry.