Invoke Sublime Text from Volt MX Iris
From V9 SP 2, you can invoke the latest version of Sublime Text (a third-party source code editor) from within Volt MX Iris. This feature ensures that developers have the option to use an alternative tool to write and modify code within Iris, in addition to Iris's in-built code editor. You can also make use of the auto-complete Intellisense feature for Volt MX UI, API, and SDK functions while working with Sublime Text.
Sublime Text is a proprietary cross-platform source code editor with a Python API. This source code editor natively supports various programming and markup languages. You can use Sublime Text to add functions with plugins, which are typically community-built and maintained under free-software licenses.
Before you can start using Sublime Text from Iris, you must meet the following prerequisites:
- Use Volt MX Iris V9 SP2 or later
- Install the latest version of Sublime Text
- Install Package Control
- Install Ternjs for Sublime Text (to add Intellisense for Volt MX Iris APIs)
Enable Sublime Text
After you have met the prerequisites mentioned previously, you must enable the feature to invoke Sublime Text from Iris.
Note: By default, Iris will recognize Sublime Text if it is installed at a default location.
To enable the feature for Volt MX Iris, follow these steps:
In Volt MX Iris, do the following:
- For Windows: On the main menu, click Edit and then click Preferences.
- For Mac: On the main menu, click VoltMX Iris and then click Preferences.
The Iris Preferences window appears.
From the left pane, click Code Editor. The Code Editor section appears.
Under the Sublime section, click Browse and select the absolute file path where you installed Sublime Text in your local system.
For example, C:\Program Files\Sublime Text 3\sublime_text.exe.
For more information, click the Using Sublime Text with Iris link. You will be navigated to the Volt MX Basecamp article on using Sublime Text.
4. Click Done. The Sublime Text feature is enabled.
To do so, follow these steps:
Add Intellisense for Volt MX Iris APIs
To install Ternjs, follow these steps:
- Install the Ternjs for Sublime package from GitHub.
- Check out the following code into a sub-directory of your Sublime Text's Packages directory.
git clone [https://github.com/ternjs/tern_for_sublime.git](https://github.com/ternjs/tern_for_sublime.git)
cd tern_for_sublime npm install
Note: On OS X, you might also need to install the Fix Mac Path Sublime plugin to help Sublime Text to locate your node binary.
Note: If you have not installed the Ternjs for Sublime package, the Missing Dependencies window appears asking you to install that package.