Keyboard macros and Abbreviations

Reply
User
Posts: 1

Keyboard macros and Abbreviations

Hi,

 

I am trying to create some custom abbreviations. For example I created one for the data step as follows

 

Abbreviation:

Data

Text to insert for abbreviation: 

Data  ;

  Set  ;

Run;

 

Question - When I insert the abbreviation, by default the cursor points at the end of the Run; statement. Is there a way that I can have the cursor point at some other location, may be, at the end of the word data? 

Super User
Posts: 10,209

Re: Keyboard macros and Abbreviations

Posted in reply to erimagoyal

@erimagoyal wrote:

Hi,

 

I am trying to create some custom abbreviations. For example I created one for the data step as follows

 

Abbreviation:

Data

Text to insert for abbreviation: 

Data  ;

  Set  ;

Run;

 

Question - When I insert the abbreviation, by default the cursor points at the end of the Run; statement. Is there a way that I can have the cursor point at some other location, may be, at the end of the word data? 


In EG, you have Cursor Controls available while you define a keyboard macro; you can use a series of those to put the cursor where you want it after insertion of text.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Trusted Advisor
Posts: 1,242

Re: Keyboard macros and Abbreviations

Posted in reply to erimagoyal

Hi @erimagoyal,

 

Yes, you can add navigation commands to the keyboard macro in order to move the cursor where you want.

 

  1. Menu Tools --> Keyboard Macros --> Macros... 
  2. Select your Abbreviation in the list
  3. Click "Edit..." button
  4. Select "Navigation" from drop-down list "Categories"
  5. Select the desired command for cursor movement (e.g. "Move cursor up") and press the double-arrow button to insert it.
  6. Repeat step 5 with the same or other commands, as needed.


Kbd_macros.png

 

Ask a Question
Discussion stats
  • 2 replies
  • 71 views
  • 1 like
  • 3 in conversation