How to refresh/update editor

Reply
Occasional Contributor
Posts: 14

How to refresh/update editor

 

 

How to update/refresh script file?

 

This might be an XY problem: What I really want is to use VIM-keybindings in SAS, but this will probably never be possible (in interactive mode). The next best thing is to  use any other editor than the SAS editor, for example Sublime/Atom/Vim. 

 

The following is a possible workaround: Have the sas-program opened in both the SAS editor and for example the Sublime-editor. Edit the program in Sublime, save file in sublime, go to SAS and refresh/update the file, and then run a selection of the program. 

 

This, however, requires that SAS is able to refresh the program file. Is this possible? Further, I prefer that the cursor position is retained in the refreshed program.

 

Sublime can refresh and thus reload any changes made in SAS, but I don't know how to get SAS to reload any changes made in Sublime. 

 

 

Platform: SAS Base 9.3 on Windows 7.

 

 

Esteemed Advisor
Posts: 6,669

Re: How to refresh/update editor

You can define keyboard macros in the SAS enhanced editor. This might make it unnecessary to use an external editor.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 14

Re: How to refresh/update editor

Thanks Smiley Happy I already use keyboard macros, however they are only a small subset the features that Sublime/Vim offer :/
See these links for info on what vim can do:
http://federicoramirez.name/why-vim-is-awesome/
https://stackoverflow.com/a/1220118/1831980

Esteemed Advisor
Esteemed Advisor
Posts: 7,222

Re: How to refresh/update editor

Yes, the enhanced editor was only enhanced back in V8 days, so it is old and not a good as pretty much any other ide out there.  If you want to use third party editors, depending on your install you could run directly through the editor of your choice, batch mode for instance.  There is no "refresh" in the SAS editor, you would need to re-load the file.  This is probably why most still use the embedded editor.  It would however be great to move out to a more plugin orientated approach, i.e. here is a plugin for your chosen IDE, but I don't see that happening.  As @KurtBremser stated there are keyboard macros, and also something called abbreviations, but even things such as code completion and such like are not present.

Esteemed Advisor
Posts: 6,669

Re: How to refresh/update editor

Any IDE for code writers should take its cues from tools like the venerable Turbo Pascal IDE, that put your cursor on the offending source code when you had a syntax error during compiling or a runtime error. Compared to that, SAS IDE's are really lacking.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
SAS Super FREQ
Posts: 676

Re: How to refresh/update editor

If you are using SAS Enterprise Guide and you modify the code outside of SAS, the editor in SAS Enterprise Guide will show you this:

Editor Reload

Occasional Contributor
Posts: 14

Re: How to refresh/update editor

That's nice. It does not work for me however. I'm on SAS EG 5.1, what version are you using?
SAS Super FREQ
Posts: 676

Re: How to refresh/update editor

My SAS Enterprise Guide version: 7.13 HF5 (7.100.3.5486) (32-bit)

 

I do not know with wich version this was introduced.

 

Ask a Question
Discussion stats
  • 7 replies
  • 146 views
  • 2 likes
  • 4 in conversation