ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Delphin Assistant

by adoxography ST3

Sublime enhancements for grammar engineering with DELPH-IN tools

Details

Installs

  • Total 337
  • Win 269
  • Mac 44
  • Linux 24
Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Delphin Assistant

This package lets Sublime Text 3 handle certain file types maintained by the DELPH-IN Consortium elegantly.

Features

  • Syntax highlighting for TDL, [incr tsdb()] testsuites, and VPM files
  • Commenting shortcut with CTRL+/
  • [incr tsdb()] test snippet

[incr tsdb()] syntax:

TDL syntax:

Installation

The recommended installation method is to use Sublime's Package Control.

The package can also be installed directly; assuming you have git installed, the commands for the various operating systems are:

  • Windows: git clone https://github.com/adoxography/delphin-assistant "%APPDATA%/Sublime Text 3/Packages/"
  • OS X: git clone https://github.com/adoxography/delphin-assistant "~/Library/Application Support/Sublime Text 3/Packages/"
  • Linux: git clone https://github.com/adoxography/delphin-assistant ~/.config/sublime-text-3/Packages/

After installation, all relevant features are available in files with the extensions .tdl, .vpm, and .tsdb for TDL files, VPM files, and [incr tsdb()] testsuites, respectively.

Usage

[incr tsdb()] syntax

All [incr tsdb()] tests are expected to begin with the following four lines, in order: * Source * Vetted * Judgment * Phenomena

To ensure that these lines are created in the correct order, the package comes with a test snippet which will generate the shell of a test for you: just type “test” and press TAB while in a .tsdb file.

Subsequent lines are open to user customization. The Delphin Assistant reads from the first line it finds in the testsuite that begins with Lines: to determine the number of lines that should follow the four lines mentioned earlier. By default, it will highlight any line labelled orth-seg or gloss by token, such that odd-numbered tokens are a different colour than even-numbered tokens. To adjust which lines should be token-separated, browse to Preferences -> Package Settings -> Delphin Assistant -> Settings and in your user settings, create a key/value pair for "tsdb_tokenized_lines". Note that the value must be an array.

By default, tokens will be separated by whitespace and the following characters: !#$%&()*+,-./:;<=>?@[]^_\`{|}~\. These characters can be changed by adjusting the "tsdb_split" value in your Delphin Assistant user preferences. Note that splitting on the single quote (') is not supported at this time.

Compiling a [incr tsdb()] testsuite

[incr tsdb()] testsuites can be compiled and added to an existing grammar from within Sublime, using the make_item script written by Emily Bender and contributors. To compile a testsuite, press CTRL+SHIFT+P to open the command palette, and type 'Compile [incr tsdb()] testsuite'. You will be prompted for a folder name; the compiled item file will be saved in this folder (relative to the [incr tsdb()] testsuite file). If you want any specific mappings done during compilation, override the tsdb_make_map setting of the Delphin Assistant package settings and add one JSON object per mapping to the array, with values specified for from and to. (An example mapping is provided in the default package settings.)

You can also specify a skeleton folder within an existing grammar. If such a folder is specified, the item file will be saved relative to the skeleton folder, and all of the housekeeping (moving the Relations file, editing Index.lisp) will be taken care of for you. To specify a skeleton folder, override the tsdb_skeleton_dir setting of the Delphin Assistant package settings.

Removing a compiled [incr tsdb()] testsuite

Compiled [incr tsdb()] testsuites can also be removed using the command palette using the 'Delete [incr tsdb()] testsuite' command. You will be prompted with a list of compiled testsuites; selecting one will cause its folder and entry in Index.lisp to be removed. This functionality is only available if testsuites are being compiled into a skeleton directory.

This plugin is developed and maintained independently of the DELPH-IN Consortium.