<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Referencing marked text in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491164#M128748</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/229452"&gt;@Posterne&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a good idea! Thanks for sharing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that you don't necessarily want to comment out a whole line (which is what the Ctrl+/ shortcut does -- but not so easily on non-English keyboards btw.), but only selected text such as a word or a couple of words or several lines of code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can set up a keyboard macro containing a sequence of Enhanced Editor commands for this task:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;From the main menu (with an Enhanced Editor window being active) select Tools --&amp;gt; Keyboard Macros --&amp;gt; Macros...&lt;/LI&gt;
&lt;LI&gt;Click "Create..." button.&lt;/LI&gt;
&lt;LI&gt;Enter a name and (optionally) a description for your keyboard macro.&lt;/LI&gt;
&lt;LI&gt;Select Miscellaneous (or All -- but this list can be very long) from the drop-down list "Categories".&lt;/LI&gt;
&lt;LI&gt;Select "Cut selection" from the "Commands" list and click the double-arrow button to put the command into the "Keyboard macro contents" box.&lt;/LI&gt;
&lt;LI&gt;Select "Edit" from the "Categories" list and "Insert a string" from "Commands".&lt;/LI&gt;
&lt;LI&gt;Click the double-arrow button, type &lt;FONT face="courier new,courier"&gt;/*&amp;nbsp; */&lt;/FONT&gt; into the pop-up Window "Insert String" and press "OK".&lt;/LI&gt;
&lt;LI&gt;Select "Navigation" from the "Categories" list and "Move cursor left" from "Commands".&lt;/LI&gt;
&lt;LI&gt;Click the double-arrow button three times.&lt;/LI&gt;
&lt;LI&gt;Select "Navigation" from the "Categories" list, "Paste from clipboard" from "Commands" and click the double-arrow button.&lt;BR /&gt;Now the "Create Keyboard Macro" window should look something like this:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="create_kbd_macro.png" style="width: 500px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22873i3D7D38E90D7DDFA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="create_kbd_macro.png" alt="create_kbd_macro.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;Click "OK".&lt;/LI&gt;
&lt;LI&gt;Click "Assign keys..." button in window "Keyboard Macros" (which should now be open automatically, with the new macro &lt;STRONG&gt;selcomm&lt;/STRONG&gt; selected).&lt;/LI&gt;
&lt;LI&gt;Click into the field "Press new shortcut key", then press your desired keyboard shortcut, e.g. Ctrl+F3. (If there are no conflicts*, the message "Currently assigned to: None" will be displayed.)&lt;/LI&gt;
&lt;LI&gt;Click "OK".&lt;/LI&gt;
&lt;LI&gt;Click "Close" to close the "Keyboard Macros" window.&lt;/LI&gt;
&lt;LI&gt;Test the keyboard macro.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;As you can see from the commands, the macro uses the clipboard. Hence, you shouldn't use it while you have something important in the clipboard. But I think this is only a minor limitation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*EDIT: "no conflicts" refers only to other Enhanced Editor keyboard&amp;nbsp;shortcuts. There could still be a conflict with a definition from the KEYS window and with shortcuts from the operating system or other software. So, select the shortcut with that in mind.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2018 11:24:35 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2018-08-30T11:24:35Z</dc:date>
    <item>
      <title>Referencing marked text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491136#M128728</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create a keyboard shortcut that will automatically make marked text into a comment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want is for it to do the following:&lt;/P&gt;&lt;P&gt;/* [marked text] */ ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is, I don't know how to reference marked text when creating the shortcut.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 08:44:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491136#M128728</guid>
      <dc:creator>Posterne</dc:creator>
      <dc:date>2018-08-30T08:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing marked text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491138#M128730</link>
      <description>&lt;P&gt;What software are you using.&amp;nbsp; The old Locally installed SAS editor used to let you press:&lt;/P&gt;
&lt;P&gt;Control + /&lt;/P&gt;
&lt;P&gt;To comment a line, and&lt;/P&gt;
&lt;P&gt;Control + Shift + /&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To uncomment (or a keystroke like that, been a while since I used it).&amp;nbsp; Unfortunately the editors are really quite old and clunky now, the "Enhanced Editor" came out with version 8, and hasn't had any updates.&amp;nbsp; Not sure what Enterprise uses or the other packages.&amp;nbsp; It would be great to have a decent editor/IDE, but I don't see it happening any time soon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I tend to do is drop a new row before and after and put the /* and */ on these extra lines, that way you only need to add/remove those rows to comment/uncomment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for kjeyboard shortcuts, you would need to be a bit more specific.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 08:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491138#M128730</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-30T08:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing marked text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491139#M128731</link>
      <description>&lt;P&gt;I'm using SAS base 9,4 and as far as I can see, there is no "create comment" shortcut (at least not listed in "Keys"). So I'm in trhe enhanced editor, in "Keys", and i want to make the open shortcut ctl + F3 a shortcut to making marked text into a comment.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 08:55:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491139#M128731</guid>
      <dc:creator>Posterne</dc:creator>
      <dc:date>2018-08-30T08:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing marked text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491140#M128732</link>
      <description>&lt;P&gt;Then you should be able to use Cntrl+/:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/Tips:Ctrl_%2B_/_is_a_quick_and_easy_way_to_comment_out_SAS_code" target="_blank"&gt;http://www.sascommunity.org/wiki/Tips:Ctrl_%2B_/_is_a_quick_and_easy_way_to_comment_out_SAS_code&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 08:57:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491140#M128732</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-30T08:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing marked text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491164#M128748</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/229452"&gt;@Posterne&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a good idea! Thanks for sharing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that you don't necessarily want to comment out a whole line (which is what the Ctrl+/ shortcut does -- but not so easily on non-English keyboards btw.), but only selected text such as a word or a couple of words or several lines of code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can set up a keyboard macro containing a sequence of Enhanced Editor commands for this task:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;From the main menu (with an Enhanced Editor window being active) select Tools --&amp;gt; Keyboard Macros --&amp;gt; Macros...&lt;/LI&gt;
&lt;LI&gt;Click "Create..." button.&lt;/LI&gt;
&lt;LI&gt;Enter a name and (optionally) a description for your keyboard macro.&lt;/LI&gt;
&lt;LI&gt;Select Miscellaneous (or All -- but this list can be very long) from the drop-down list "Categories".&lt;/LI&gt;
&lt;LI&gt;Select "Cut selection" from the "Commands" list and click the double-arrow button to put the command into the "Keyboard macro contents" box.&lt;/LI&gt;
&lt;LI&gt;Select "Edit" from the "Categories" list and "Insert a string" from "Commands".&lt;/LI&gt;
&lt;LI&gt;Click the double-arrow button, type &lt;FONT face="courier new,courier"&gt;/*&amp;nbsp; */&lt;/FONT&gt; into the pop-up Window "Insert String" and press "OK".&lt;/LI&gt;
&lt;LI&gt;Select "Navigation" from the "Categories" list and "Move cursor left" from "Commands".&lt;/LI&gt;
&lt;LI&gt;Click the double-arrow button three times.&lt;/LI&gt;
&lt;LI&gt;Select "Navigation" from the "Categories" list, "Paste from clipboard" from "Commands" and click the double-arrow button.&lt;BR /&gt;Now the "Create Keyboard Macro" window should look something like this:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="create_kbd_macro.png" style="width: 500px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22873i3D7D38E90D7DDFA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="create_kbd_macro.png" alt="create_kbd_macro.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;Click "OK".&lt;/LI&gt;
&lt;LI&gt;Click "Assign keys..." button in window "Keyboard Macros" (which should now be open automatically, with the new macro &lt;STRONG&gt;selcomm&lt;/STRONG&gt; selected).&lt;/LI&gt;
&lt;LI&gt;Click into the field "Press new shortcut key", then press your desired keyboard shortcut, e.g. Ctrl+F3. (If there are no conflicts*, the message "Currently assigned to: None" will be displayed.)&lt;/LI&gt;
&lt;LI&gt;Click "OK".&lt;/LI&gt;
&lt;LI&gt;Click "Close" to close the "Keyboard Macros" window.&lt;/LI&gt;
&lt;LI&gt;Test the keyboard macro.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;As you can see from the commands, the macro uses the clipboard. Hence, you shouldn't use it while you have something important in the clipboard. But I think this is only a minor limitation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*EDIT: "no conflicts" refers only to other Enhanced Editor keyboard&amp;nbsp;shortcuts. There could still be a conflict with a definition from the KEYS window and with shortcuts from the operating system or other software. So, select the shortcut with that in mind.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 11:24:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491164#M128748</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-08-30T11:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing marked text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491170#M128749</link>
      <description>&lt;P&gt;Just what i needed!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 11:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491170#M128749</guid>
      <dc:creator>Posterne</dc:creator>
      <dc:date>2018-08-30T11:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing marked text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491171#M128750</link>
      <description>&lt;P&gt;I will use it, too. Thanks again.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 11:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-marked-text/m-p/491171#M128750</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-08-30T11:37:21Z</dc:date>
    </item>
  </channel>
</rss>

