USFOS syntax in ST
In 2007, to avoid the monotony of looking at a wall of text and numbers within long FEM input files, I created a couple of plug-ins for TextPad, my primary text editor of choice back then. These included a syntax file and a clip library. However in 2012, I switched to using Sublime Text as my primary text editor, since it works across all three major platforms (MacOS, Linux, Windows), but more importantly, because it is also available as a portable version for Windows. While I did create a similar one for Sublime Text 2 post the switch, its syntax was a messy plist file.
With version 3, Sublime Text has simplified its syntax. So this weekend, I took the opportunity to fix my handicap. The outcome is this public repository usfos_st — released as always under a liberal license. Here is a view of USFOS control file syntax-highlighted in Sublime Text.
Ensure USFOS model files and control files end with
.fem for syntax highlighting to work.
Recommended method of installation
With this package now available from Package Control,1
usfos_st can be installed from directly within Sublime Text. Here is how:
- From Tools, select Install Package Control… (Skip if already installed.)
- From Preferences > Package Control > Install Package, search for
Alternatively, if you have no access to internet or prefer a manual install then, download and place usfos.sublime-syntax file under Packages > User folder, which is accessible from Preferences > Browse Packages… menu.2