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

 

 

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

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

 

 

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 685 views
  • 3 likes
  • 3 in conversation