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

 

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

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

 

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
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!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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