Desktop productivity for business analysts and programmers

Abbreviations inside comments (EG 5.1)

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

Abbreviations inside comments (EG 5.1)

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.


Accepted Solutions
Solution
‎08-12-2013 09:32 AM
Community Manager
Posts: 2,884

Re: Abbreviations inside comments (EG 5.1)

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

View solution in original post


All Replies
Super Contributor
Posts: 307

Re: Abbreviations inside comments (EG 5.1)

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.

Valued Guide
Posts: 3,208

Re: Abbreviations inside comments (EG 5.1)

SAS Enterprise Guide for SAS programmers - The SAS Dummy (switch dms to Eguide)

SAS Enterprise Guide for Programmers (an overview)

---->-- ja karman --<-----
Solution
‎08-12-2013 09:32 AM
Community Manager
Posts: 2,884

Re: Abbreviations inside comments (EG 5.1)

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

Occasional Contributor
Posts: 8

Re: Abbreviations inside comments (EG 5.1)

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.

Community Manager
Posts: 2,884

Re: Abbreviations inside comments (EG 5.1)

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

Super User
Posts: 11,104

Re: Abbreviations inside comments (EG 5.1)

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.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 796 views
  • 0 likes
  • 5 in conversation