BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
RedUser77
Obsidian | Level 7

I am wanting to achieve the commenting style seen below. Is there a keyboard shortcut for this style? How does one format this commenting style? I know how to add typical commenting syntax such as CTRL + / or CTRL + SHIFT + /, but would like to figure out the below.. And, I can see the style on SAS Help Center, but do not see how to format said commenting style.

 

RedUser77_0-1678115144880.png

RedUser77_1-1678115281339.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

One common thing people like to do is add a "comment block header" to the top of a program. You can create a template for this using the code snippet (abbreviation) feature, and then map that to a key. You can also build an editor macro (not to be confused with SAS macro language) to add certain text (like current date, etc) to that, and then assign a shortcut key for it. Start at Program->Manage macros and snippets.

 

There are many actions that you can automate in this way -- have a look around and see what you can build.

 

ChrisHemedinger_0-1678116026784.png

 

 

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

View solution in original post

3 REPLIES 3
ChrisHemedinger
Community Manager

One common thing people like to do is add a "comment block header" to the top of a program. You can create a template for this using the code snippet (abbreviation) feature, and then map that to a key. You can also build an editor macro (not to be confused with SAS macro language) to add certain text (like current date, etc) to that, and then assign a shortcut key for it. Start at Program->Manage macros and snippets.

 

There are many actions that you can automate in this way -- have a look around and see what you can build.

 

ChrisHemedinger_0-1678116026784.png

 

 

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
Tom
Super User Tom
Super User

Snippet is the way to go.

 

But I really recommend ditching the "box". 

1) It does not really make the comment stand out any better than simple white space.

2) You will never be able to keep the box aligned after editing.

3) You could end up with the box characters off the edge of the screen, which can cause them to accidently become part of the code.

 

So not only does the box do no good, it could actually do harm.

 

RedUser77
Obsidian | Level 7

After doing more research into it, I completely agree. Thanks anyways!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 381 views
  • 3 likes
  • 3 in conversation