SACS syntax in ST3

Bentley’s SACS is the other suite I often use at work. So in the tradition of improving one’s own work environment, I extended syntax-highlighting for SACS input files with this public repository sacs_st. Here is a view of a couple of files syntax-highlighted in Sublime Text 3.

SACS input file syntax-highlighted in Sublime Text 3.


Download and place sacs.sublime-syntax file under Packages > User folder, which is accessible from Preferences > Browse Packages… menu.

Be sure to have SACS input files end with .inp for syntax highlighting to work.

If and when my submission to Package Control is accepted, I will update this note to add a recommended installation method via Package Control.


SACS commands are spread across its numerous manuals, and so it was an interesting exercise in amassing them all into a list first, and then sort them to remove duplicates. But before doing so, I wanted to see which ones were repeated. So I wrote this script to find out:

#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Find most common sacs commands across modules
# 2020 ckunte

import re
from collections import Counter

# read a file containing all sacs commands
commands = re.findall(r'\w+', open('sacs-commands-all.txt').read())

# print 85 most common commands across all sacs modules
mcom = Counter(commands).most_common(85)
for com, nos in mcom:
    print("{:<12}{:<9}".format(com, nos))

The number 85 in the code above is arbitrary. I tried a few others before like 100, 90, until single occurrences of commands reduced to just a couple.