Editor integrations
Tamarin is supported through plugins, extensions, and syntax definitions for several editors. Below you can find extensions for Visual Studio Code, VIM, Emacs, Sublime Text 3, Notepad++, and Atom.
The source code of some of these extensions can be found in the etc/
folder of Tamarin’s source code repository.
VSCode
Tamarin has an official plugin for Visual Studio Code providing syntax highlighting, detection of syntax errors, and numerous wellformedness checks. It is available from the VSCode marketplace or from Open VSX. Its source code can be found in vscode-tamarin repository.
VIM
Using Vim plugin managers
This example will use Vundle to install the plugin directly from this repository. The instructions below should be translatable to other plugin managers.
- Make sure you installed Vundle (or your favorite plugin manager)
- Put the below, or equivalent instructions, into your
.vimrc
:Plugin 'tamarin-prover/editors'
- Restart Vim or reload the configuration
- Run the Vim command
:PluginInstall
(or equivalent)
You can install updates through :PluginUpdate
.
Manual installation (not recommended)
If you install the Vim support files using this method, you will need to keep the files up-to-date yourself.
- Create
~/.vim/
directory if not already existing, which is the typical location for$VIMRUNTIME
- Copy the contents of
etc/vim
to~/.vim/
, including the folders.
Emacs
The spthy-mode.el
implements a SPTHY major mode in Emacs. You can load it with M-x load-file
, or add it to your .emacs
in
your favorite way.
Sublime Text 3
editor-sublime is a plug-in for the Sublime Text 3 editor to support Tamarin users. The plug-in has the following functionality:
- Basic Syntaxes
- Snippets for Theories, Rules, Restrictions and Lemmas
editor-sublime can be installed in two ways:
The first and preferred method is with PackageControl.io. editor-sublime can now be installed via the sublime package manager. See the install and usage documentation, then search and install TamarinProver.
Alternatively it can be installed from source. For Linux / macOS this process can be followed. We assume you have
the git
tool installed.
- Change Directory to Sublime Text packages directory:
- macOS:
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
- Linux:
cd ~/.config/sublime-text-3/Packages/
- macOS:
- Clone the directory into the Packages folder.
- SSH:
git clone git@github.com:tamarin-prover/editor-sublime.git
- HTTPS:
git clone https://github.com/tamarin-prover/editor-sublime.git
- SSH:
- Close and re-open Sublime, and in the bottom right list of syntaxes ‘Tamarin’ should now be in the list.
Please be aware that this plugin is under active development and as such, several of the features are still implemented in a prototypical manner. If you experience any problems or have any questions on running any parts of the plug-in please visit the project GitHub page.
Notepad++
Follow the “Import a UDL” steps from the Notepad++ documentation using the notepad_plus_plus_spthy.xml file.
Atom
The language-tamarin package provides Tamarin syntax
highlighting for Atom. To install it, run apm install language-tamarin
.