OpenSees is a simple plug-in for Sublime Text adding syntax highlighting, code completion, build commands, etc for the OpenSees extension language of Tcl (.tcl).
- Support for OpenSees syntax, in addition to Tcl syntax (using default Tcl package)
- Command completion for some Tcl commands (using default Tcl package snippets)
- Command completion for many OpenSees commands
- Run OpenSees scripts (.tcl) using Sequential interpreter without leaving Sublime
- Run OpenSees scripts (.tcl) using Parallel interpreters without leaving Sublime
If first time downloading OpenSees, you will need to register to message board.
- Tcl [Required]
- Download Tcl from OpenSees download website in order to have compatible version with OpenSees (may need to uninstall previous versions)
- Install Tcl (need to change installation path from
C:/Tcl
toC:/Program Files/Tcl
) - If Sublime Text was running while installing Tcl, it needs to be restarted in order for the plugin to work
- OpenSees [Required]
- Download OpenSees from OpenSees download website
- Locate
OpenSees.exe
in a convenient directory (if using a location different from default%userprofile%/OpenSees/
,opensees_dir
oropensees
settings should be changed)
- MPICH2 [Optional, only if using OpenSeesParallel]
- Download MPICH2 from OpenSees parallel download website in order to have compatible version with OpenSeesParallel (may need to uninstall previous versions)
- Install MPICH2:
- If you get an error message, you may need to install .NET Framework 3.5 first (need 2.0 as of 3/11/2015, but 3.5 works as it includes 2.0 as well)
- You must be an administrator to install it
- Make sure installation directory is
%programfiles%/MPICH2/
, if location is different,mpiexec
setting should be changed - For more information, see this tutorial
- OpenSeesParallel (OpenSeesSP, OpenSeesMP) [Optional]
- Download OpenSeesParallel from OpenSees parallel download website
- Locate
OpenSeesSP.exe
andOpenSeesMP.exe
in a convenient directory (if using a location different from default%userprofile%/OpenSees/
,opensees_dir
oropensees_sp
/opensees_mp
settings should be changed)
- Tcl [Required]
- Tcl will most likely be already installed, check current versions to make sure it is compatible with OpenSees (Open
Terminal
, typetclsh
and thenputs $tcl_version
) - Download Tcl from OpenSees download website in order to have compatible version with OpenSees (may need to uninstall previous versions)
- Install Tcl
- If Sublime Text was running while installing Tcl, it needs to be restarted in order for the plugin to work
- Tcl will most likely be already installed, check current versions to make sure it is compatible with OpenSees (Open
- OpenSees [Required]
- Download OpenSees from OpenSees download website
- Locate
OpenSees
executable in a convenient directory (if using a location different from default~/OpenSees/
,opensees_dir
oropensees
settings should be changed)
- OpenMPI [Optional, only if using OpenSeesParallel]
- Not needed unless compiling binaries of OpenSeesParallel from source, see below for more information
- If compiling from source, download OpenMPI from OpenMPI Download and install
- OpenSeesParallel (OpenSeesSP, OpenSeesMP) [Optional]
- As of 3/11/2015, OpenSees parallel download website is not providing binaries for OS X due to the removal of built in OpenMPI, so user will need to compile the binaries from source in order to use OpenSeesSP and OpenSeesMP
- After compiling, locate
OpenSeesSP
andOpenSeesMP
executables in a convenient directory (if using a location different from default~/OpenSees/
,opensees_dir
oropensees_sp
/opensees_mp
settings should be changed) - OpenSeesParallel has not been tested in OS X yet, if you find any problems please use the issues portal
Linux platform has not been tested yet, if you find any problems please use the issues portal.
OpenSees download website and OpenSees parallel download website do not provide binaries for Linux, so user will need to compile the binaries from source in order to use OpenSees, OpenSeesSP and OpenSeesMP.
If compiling from source, Tcl will be needed for all interpreters and OpenMPI will be needed for OpenSeesSP and OpenSeesMP. After compiling, locate OpenSees
, OpenSeesSP
and OpenSeesMP
executables in a convenient directory (if using a location different from default ~/OpenSees/
, opensees_dir
or opensees
/opensees_sp
/opensees_mp
settings should be changed)
Only Tcl and OpenSees are required for running scripts, OpenSeesParallel is optional.
Using Package Control (Recommended)
For all Sublime Text users it is recommend to install via Package Control.
- Install Package Control if you haven't yet.
- Use
ctrl+shift+P
(Win, Linux) orcmd+shift+P
(OS X) thenPackage Control: Install Package
- Look for
OpenSees
and install it.
- Click the
Preferences > Browse Packages…
menu - Browse up a folder and then into the
Installed Packages/
folder - Download zip package, rename it to
OpenSees.sublime-package
and copy it into theInstalled Packages/
directory - Restart Sublime Text
- If you are using Package Control, updating will be automatic and you don't have to worry about it.
- If using Manual Install, repeat steps above and replace
OpenSees.sublime-package
with the new downloaded one.
First, make sure Installation steps were completed for your operating system.
- With a .tcl script open, press
ctrl+b
(Win, Linux) orcmd+b
(OS X) to run previously run interpreter (defaults to Sequential) - To change interpreters, with a .tcl script open, press
ctrl+shift+b
(Win, Linux) orcmd+shift+b
(OS X) and a popup with all options will appear - These options are also available using the menu bar:
Tools > Build
andTools > Build With...
Setting files are parsed with the following priority:
- Project Settings (.sublime-project, needs to be created/opened using
Project > Save Project As...
andProject > Open Project
) - User Settings (see below)
- Default Settings (see below)
User and Default settings can be found using Sublime Text menu: Preferences > Package Settings > OpenSees
Settings - User
is where you change your settings for OpenSees (make sure you change this file for configuration to persists when plug-in updated).Settings - Default
is a good reference with detailed descriptions for each setting (do not modify this file, use User settings for overriding).
Some important features about the Settings in this plug-in:
- Any string containing
${<var>}
will be expanded to the operating system's enviroment variable (if exists) ${<var>}
can also reference to any setting defined in any of the settings files, using.
separation for accessing nested settings (e.g.${test.setting}
)- Settings can be platform specific. Rather than specifying a string path to use, a dictionary is specified. This dictionary may contain the following keys:
windows
,linux
, andosx
- Any bug or feature request should be reported here.
- You are welcome to fork and submit pull requests.
All of the source code is available at github project under the MIT licence:
Copyright (c) 2016 Borja Zarco <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.