- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi all SAS Users,
Normally SAS supports a few hotkeys for us to deal with coding conveniently. For example, if we want to comment the selection with line comments, we can use 'Ctr+/"
For example:
/*Before hotkey*/
abcdef
/*After hotkey Ctr+ / */
/*abcdef*/
I also google some other useful hotket as the link here.
However, I try to find a hotket that can put words into single quotation marks. In detail
/*Before hotkey*/
abcdef
/*I try to find a hotkey to generate this result */
'abcdef'
I try to simplify my work and learn as much as I can 😄
Warmest regards.
P/S: I did a search but it seems to me that there is no hotkey so far for doing so, need a macro as the link here.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Phil_NZ,
If you're using the traditional Display Manager interface with the Enhanced Editor, it's fairly easy to create a keyboard macro for this purpose and assign a hotkey. I've just done this, following the general instructions of this 2018 post. Actually, I've created two macros:
Put current word into single quotes (i.e., place the cursor inside or immediately after the word, then hit shortcut key):
Put selected text (may include several words) into single quotes:
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It really depends what editor you are using. Are you using one of the many SAS interfaces to edit with? Which one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Tom
I am using SAS EG. It is my interface
Warm regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Phil_NZ,
If you're using the traditional Display Manager interface with the Enhanced Editor, it's fairly easy to create a keyboard macro for this purpose and assign a hotkey. I've just done this, following the general instructions of this 2018 post. Actually, I've created two macros:
Put current word into single quotes (i.e., place the cursor inside or immediately after the word, then hit shortcut key):
Put selected text (may include several words) into single quotes:
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It is what I have now with my interface...
Sorry for the blur of the pictures but I took it by my phone.
As we can see, there is no option called "Keyboard macro".
Warmest regards.
UPDATE:
I just have a look and do some Google search, and then I figure out that it works in SAS Base while I am using SAS EG, so is there any reasonable solution for SAS EG please ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Those macros will work in EG:
While in a program, open Program | Manage Macros and Snippets then click on Create to open a window looking like those in screenshots posted by @FreelanceReinh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Well, this is interesting, some commands don't work at all, "insert char" is one of those.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Lol, I try to push the single quote a lot of time until it works.....seems to be a bug or the like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for pointing this awesome point.
Even I assign and test successfully, however, I have something in my mind as below:
In my interface, it will not display totally like the Table that @FreelanceReinh shows, my interface displayed like that
First, the three single quotations are a little bit weird, why it is 3 sngle quotations?
Second, it is super hard to type a character in the "Insert character" box, do you face the same problem?
Third, It displays "Move caret..." rather than "Move curse...", easy to confuse other users.
Warm regards.