BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Adrienne
Fluorite | Level 6

I'm a SAS programmer trying out EG 5.1. I imported by keyboard abbreviations from my SAS 9.2 session and none of them worked. I figured out that they didn't work because they all started with a period ('.cmtmakefmt'). If I changed them to start with '_',  they worked sometimes. In trying to understand why they didn't always work, I learned that I was trying to use them inside comment sections, e.g. /* */ If I used them outside and put semi colons after them,they would be recalled.

Is there way to set up EG so that I can use abbreviations where the editor doesn't care where you are in the code, it just allows you to stick in code, like it does in the Enhanced Editor in SAS DMS.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

I've verified the behavior you see -- abbreviations don't appear to trigger inside comment blocks.  In EG 4.3 and later, the editor abbreviations are tied to the code completion feature, and code completion doesn't trigger inside of a comment block.

As a workaround, you can use Program->Editor Macro->Macros to see a list of your abbreviations and assign any of them to a shortcut key sequence.  These will work even inside of a comment block.

macros.png

Chris

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

6 REPLIES 6
Fugue
Quartz | Level 8

I believe you are referring to the BASE SAS command line functionality (using SAS Windows) re: keyboard shortcuts? There is no similiar command line functionality in EG.

ChrisHemedinger
Community Manager

I've verified the behavior you see -- abbreviations don't appear to trigger inside comment blocks.  In EG 4.3 and later, the editor abbreviations are tied to the code completion feature, and code completion doesn't trigger inside of a comment block.

As a workaround, you can use Program->Editor Macro->Macros to see a list of your abbreviations and assign any of them to a shortcut key sequence.  These will work even inside of a comment block.

macros.png

Chris

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!
Adrienne
Fluorite | Level 6

Thanks, Chris. Not what I was hoping to hear, but not surprised. I've got too many abbreviations to map to function keys, but I'll play around to see if I can figure out some acceptable workarounds .I hope someday there will be an option that we can invoke that says 'just put the text I want in here, regardless. 🙂 '  or perhaps text sequences that begin with a certain string like '!!' can mean ignore code completion rules.

ChrisHemedinger
Community Manager

I'll forward this thread to the R&D team for them to consider.  It would be nice to have it working even within comment blocks.

Chris

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!
ballardw
Super User

By any chance, and I think this is a long shot, but did you try starting your abbreviations with */ ? It might fool the processor and since your abbreviation probably doesn't actuall put */ text into the editor...

Completely untested as I don't usually use EG and do not have access to EG5.1 at this time.

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 6 replies
  • 3136 views
  • 0 likes
  • 5 in conversation