Atom is a free text editor from GitHub. Much like TextPad, UltraEdit, and other text editors, there are many ways to customize Atom to play nicely with SAS. Continue reading if you're interested in learning more.
If you'd like a little hand-holding, check out the Atom tuturials on YouTube from LevelUpTuts.
On the other hand, you could skip the tutorials and go straight to the download page.
Once Atom has been installed, use File > Add Project Folder
to open a folder containing a SAS program.
This action should add a directory tree on the left side of Atom. From this tree, double-click on an individual SAS program to open it.
Most of the default editor options are what you want them to be. To change editor settings, select File > Settings > Editor
.
Options are sorted alphabetically. Here are a few options that I would recommend changing from the default.
- Enable
Scroll Past End
. - Enable
Show Indent Guide
. - Set
Tab Length = 3
. - Set
Tab Type = soft
.
Packages allow you to extend the base functionality of Atom. Several packages come pre-installed. Each package has its own settings. Let's practice editing package settings. Select File > Settings > Packages
.
In the search box, type the package name listed below and press Enter.
autocomplete-plus
welcome
To get the most out of Atom for SAS, you will want to install the following packages. The more of these packages you install, the nicer Atom will work for you in SAS. Select File > Settings > Install
.
In the search box, type the package name listed below and press Enter.
language-sas
- This package adds SAS syntax highlighting. Once you've installed it the SAS file that you have open should look a little different.
sublime-style-column-selection
- This package allows you to edit multiple lines simultaneously. Once you've installed the package:
- Use the Control key to create cursors in multiple random locations.
- Use the Alt key to create multiple cursors at the same location in several consecutive lines.
- This package allows you to edit multiple lines simultaneously. Once you've installed the package:
atom-shell-commands
- This package allows you to submit SAS jobs from within Atom.
- Once the package has been installed, open your config file by selecting
File > Config
. This file is namedconfig.cson
. Move your cursor to the very bottom of this file. - Next, open the
atom-shell-commands.cson
file included in this repository. Do so by right-clicking on this link and opening in a new tab. Select the pencil icon at right. Usectrl-a
to select all. - Copy/paste the commands from
atom-shell-commands.cson
into the end/bottom of the Atomconfig.cson
file. Save and closeconfig.cson
. - Test these updates by navigating to your SAS program and pressing
ctrl-shift-5
. This should result in some command-prompt-like lines being generated near the bottom of your Atom editor (e.g., Connecting to the SAS Grid server...). After 15-20 seconds you should see a message indicating[Finished in xx.xx seconds]
.
related
- This package allows you to open your LOG and LST files without touching your mouse.
- Once the package has been installed, from the top menu select
Packages > Related > Edit related patterns
. This file is namedrelated-patterns.cson
. - Next, open the
related.cson
file included in this repository. Do so by right-clicking on this link and opening in a new tab. Select the pencil icon at right. Usectrl-a
to select all. - Copy/paste the commands at the end/bottom of the Atom
related-patterns.cson
file. Save and closerelated-patterns.cson
. - Test these updates by navigating to your SAS program and pressing
ctrl-shift-r
. This should result in a list including your LOG and LST file. Use the up/down arrows to select the file of interest and press Enter.- Note: this feature only works if the SAS program has been opened as part of a project folder (i.e., if you can see the SAS/LOG/LST files in the tree at left). If you attempt the
ctrl-shift-r
command on a program which is not visible in the tree you will lock up Atom. You have been warned!
- Note: this feature only works if the SAS program has been opened as part of a project folder (i.e., if you can see the SAS/LOG/LST files in the tree at left). If you attempt the
file-watcher
- This packages allows your LOG and LST files to update automatically.
- Once the package has been installed, select
Settings
. I would recommend you enablePrompt on Change
. - Test this update by opening your SAS, LOG, and LST files. Then run the SAS program. You should get some pop-ups.
Now we put the above packages through their paces.
- Use
File > Open Project Folder
to open a folder containing a SAS program. - Double-click in the tree at left to open the SAS program.
- Use
ctrl-shift-5
to submit the program. - Use
ctrl-shift-r
to open the LOG and LST files. - Use
Alt-Tab
to return focus to the SAS program. - Use
ctrl-shift-5
to resubmit the program. - Acknowledge the pop-ups to see your updated LOG and LST files.
- Do a happy dance.