SAS 9.4 Enhanced Editor Custom Theme

Andreas Kracht Frandsen

2019/08/12

Revised 2019/08/13

It may seem paradoxical that my first real blog post is about SAS. Given the fact that I ranted about it on the homepage. But I want to share something that makes the editor a little less frustrating, especially for your eyes.

The Enhanced Editor in SAS is something a lot of people uses almost daily, or at least I do. I remember the first time I started SAS on my PC. I was amazed by the old and clunky interface. Which as I have been told has not changed for decades. The one thing I could not live with was the syntax colour formatting the Enhanced Editor used. White backgrounds for coding is a no go for me. Though what is more important is the colours that your display is emitting. I recommend you to download and install f.lux, no matter how many hours you sit in front of the display. It helps filtering out colourful light with wavelengths around 480 nm, that normally affects your circadian timing.

Like anything else related to SAS, the documentation for different settings/procedures are well hidden. SAS did not make it easy to change the Enhanced Editor Theme, but fear not! I will show below how you can do it. Firstly in a quick way and secondly in a longer way1. Notice that the first way will only affect sas files and not scl files. Though you can change the appearance of them using the second way. My theme uses Lucida Console and some subdued colours.

Custom Theme Through the Registry Editor

The first way to change the theme uses the Registry Editor. You can find it by searching after “regedit” in the Windows Start Menu. Next you want to find this path.

HKEY_CURRENT_USER\Software\SAS Institute Inc.\Enhanced Editor\9.4\Editor Settings\.sas\Schemes

On that path you should see the existing themes. You want to make sure that your path it is the exact same path as above, before you move on.

Next you go to my Gist containing the Registration Entries for the new theme. It can be found here: AKF_Dark.reg. Hit the “Download ZIP” button, unzip the folder and return to the Registry Editor.

You now want to import the Registry Entries, you might have done this before. All you have to do is click File -> Import locate the download reg file and then click Open.

Now you can open SAS 9.4 and choose the new theme in Tools -> Options -> Enhanced Editor using the drop-down list Scheme.

If you don’t like my font and/or colours you can either change them directly in the settings, which tends to take a long time, or change the Registry Entries directly, using hexadecimal color codes. Notice that you need to change the background for a lot of elements: code, comments, dataLines etc.

Custom Theme Using SAS 9.4

If you want to make the theme completely yourself, you can do it. Just open SAS 9.4 and choose Tools -> Options -> Enhanced Editor, in here you can set the exact colours you want. Save the theme when you are done.

Notice you always have the possible to change back to the default theme. Lastly I want to remind you of a very useful tip when coding a SAS macro, in my other blog post Syntax Colouring Inside SAS Macros. Feel free to share your own links to your own theme using Disqus below.

Disclaimer: I am not affiliated with SAS Institute.


  1. I had to do it in the second way, to obtain the first way.↩︎