writing SAS code to import .kmf files - sas

I am trying to figure out how to import .kmf files (keyboard macro files) using code in SAS. I have been doing research and have found nothing on the topic. I need to be able to manage updates to several .kmf files across several computers accross several servers. So, doing the usual import is not efficient enough for my needs. Is this even possible in the SAS envoriment? If so where can I find information to help me solve this issue?

According to SAS documents located at http://support.sas.com/kb/19/335.html
The SAS Enhanced Editor allows you to create keyboard macros and
keyboard abbreviations.
To create keyboard macros select Tools >Keyboards Macros.
To create keyboard abbreviations select Tools > Add Abbreviation.
You also have the functionality to export these to a
file and then import them into SAS on another machine.
Note that in order to avoid overwriting any existing keyboard short cut keys, the
key assignments for Keyboard Macros are not exported. You need to
reassign the keys after importing. The Abbreviations do not have key
assignments. To accomplish this do the following: Click Tools >
Keyboard Macros > Macros Hold down the SHIFT key or CTRL key and
left-click to select the abbreviations and macros to export Click on
the EXPORT button and save to a file with the extension .kmf Copy the
file to another machine. Open SAS on the other machine. Click Tools >
Keyboard Macros > Macros. Click the import buttton and select the .kmf
file. For keyboard macros only, click Assign keys and choose a new
shortcut key for each macro.
There is also a SAS Global forum paper that discusses the issues. The specific way to do what you asked for is pasted below. Refer to the entire paper at this link... (http://support.sas.com/resources/papers/proceedings09/073-2009.pdf) for details on the steps using both the editor or EG.
SHARING YOUR ABBREVIATIONS
You might want to share your abbreviations with others, or perhaps you will need to put your >abbreviations on a different computer. This is very easy to do!
EXPORTING ABBREVIATIONS
Place the cursor in the Enhanced Editor window.
Select the Tools menu and then Keyboard Macros, followed by Macros.
A window opens where you select the abbreviations to export.
• If you want to select more than one, hold down the CTRL key on your keyboard as you click on each abbreviation.
• If you would like all of them, click on the first abbreviation in the list, hold down the Shift key, and click on the
last abbreviation. They should all be highlighted. Click on the export button.

Related

Is there a shortcut to run current code block, without selecting?

Many other IDEs have a feature to run the code block your cursor is placed in. According to the docs, SAS EG has the following shortcut:
Run the selected code -> F3
But is there a shortcut for the following?
Run code block your cursor is placed in -> X
It's tedious to have to constantly reach for the mouse to click-drag-select, then hit F3.
Preemptive thank you from the laziest lizard on earth.
No, there is no shortcut (or way to create such a shortcut). SAS requires you to highlight it.
However, there are some options to make this easier. You can see the SAS EG documentation for some keyboard shortcuts; one option, for example, is to use code folding (Alt + numeric keypad hyphen) to collapse the current data step/proc step/macro, and then you can easily highlight that one line (with shift-end, as it places your cursor at the start of the line).
Also see this question and answer about SAS Enhanced Editor, which has the same basic solution, plus some other ideas.

Is there any sort of "Codelet Template" in KDevelop?

Everytime I need to input a piece of code such as "switch .. case" or "declaring a class", I desire a way I can rapidly achieve it by hitting a shortcut.
In many IDEs, we can do it by pressing some shortcut keys, and IDEs will paste a little piece of pre-defined code at the position of the focuse.
Is there any similar way in KDevelop?
I'm not meaning the File/Project Templates here.
Thanks!
Yes, use the 'Snippets' plugin distributed with Kate.
Install the Kate editor. Several of the plugins included can also be used in KDevelop; there's been some discussion of distributing those separately but it hasn't happened yet.
In KDevelop, use the menu Window -> Add Tool View and select 'Snippets'.
There will be a 'Snippets' toolview. Click on entries to paste them, or you can bind a shortcut. You can add new entries and categories.

View functions in an object [Eclipse C++]

So i am having trouble viewing the member functions of my declared objects. I am using a MAC and i have an object. I want to see what kind of functions exists in that object. I cannot find the shortcut key for this so i was wondering if someone else knew it?
On my windows computer for java it use to be ctrl + space but that does not seem to work for c++ in either my mac or windows. Please help me out.
It could be because of the Windows Language Services Utility. The default method to switch between languages on Windows is to use the ctrl + space keyboard shortcut, which could be conflicting with the keyboard shortcut for auto-complete in Eclipse.
To get rid of this conflict, you will need to remove all other languages from your computer. Here is a solution:
You can find out what languages you have set up by going to Control Panel -> Region and Language -> Keyboards and Languages (tab) and then Change Keyboards (again, how obvious…). You’ll see a list of languages installed – remove any that you don’t want (click the language and then click the Remove button) until you only have the ones you want left. That fixed it for me, but you can also check the Advanced Key Settings tab to make sure that none of the keyboard shortcuts that are set include Ctrl-Space. - Robin's Blog
Alternatively, you may also want to check whether there is any other conflict with the default keyboard shortcut with Windows and Eclipse C++ IDE:
... but you can also check the Advanced Key Settings tab to make sure that none of the keyboard shortcuts that are set include Ctrl-Space. - Robin's Blog

Microsoft Visual C++ 2012: cannot find basic stuff

Being new to Microsoft Visual Studio Ultimate 2012, I cannot find some basic things that I usually take for granted. It must be my fault for sure.
How can I have multiple views of the same file? So far I have been able to split the file window vertically, but just once.
Can I split it horizontally?
Can I split it more than once?
Can I just have the same file in multiple windows?
Can I do some refactoring?
Can I set bookmarks, to jump back and forth in the code?
Can I have a list of bookmarks/breakpoints?
To have multiple view of the same file go to the Window meni and select New Window This will show the file in multiple windows, which you'll be able to split.
For bookmarking go to the Edit menu and look at the Bookmark sub-menu near the bottom. It's got all the options you need for manipulating bookmarks.
For breakpoints go to the Debug menu, select the Windows sub-menu and pick the Breakpoints menu. It will display an window that allows you to manage all the breakpoint in the project you're working on.
To refactor just right-click in any file and you'll see a Refactor sub-menu that has a list of refactor actions.

How to implement "record macro"-like functionality similar to Microsoft Excel?

How to implement "record macro" like that in Microsoft Excel? As far as I know, I can embed a scripting interpreter(eg. javascript) and make c++ objects visible to scripts, similar to the DOM in a web browser.
My question is how do you record user actions and then generate the corresponding javascript code? In Excel we can record a macro and it will generated the appropriate VBA code.
Does someone know how to implement this feature in C++ or in other languages?
PS: Can be any language/platform -- I just want an idea of how to do it.
One way to do it is have dual event handlers for each menu item / button click.
As the standard event handlers fire, your secondary macro-builder events fire.
As the macro event builders fire you record a list of actions performed
e.g.
ActiveDocument->Save.
ActiveDocument->SaveAs.
ActiveDocument->Print.
Find (AllDocument,"ThisText").SelectFirst
Edit.Cut
Find().SelectNext
You can then translate those actions into your desired scripting language.
Hope this helps.
Have a look at the Command Pattern. Each action in the program can be represented by a Command object. So when you're recording a macro, you both perform the command and store it in a list. When you want to play back the macro, you simply run through the list you created, performing every command again.
You don't necessarily even need to use distinct objects, though it will probably be easier in the long run. As an example, Emacs has keyboard macros that simply record every keystroke, then simulates those keystrokes when you play the macro back.