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

Topas Syntax

by davidchall ALL

Syntax highlighting for TOPAS in Sublime Text

Details

Installs

  • Total 329
  • Win 110
  • Mac 91
  • Linux 128
Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
Mac 0 0 0 1 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 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

Readme

Source
raw.​githubusercontent.​com

topas-syntax

Syntax highlighting for TOPAS parameter files in Sublime Text.

Installation

Installing packages for Sublime Text is easiest through the Package Control plugin, and this package is no different.

Once you have Package Control, follow these instructions: * open the Command Palette (cmd+shift+p on Mac, ctrl+shift+p on Linux/Windows) * select Package Control: Install Package * search for Topas Syntax

Usage

Since TOPAS parameter files use the ubiquitous .txt file extension, it is not enabled by default. To apply the syntax highlighting to an opened file, select View > Syntax > Topas.

As this could become laborious when managing many parameter files, I recommend saving your directory tree as a Sublime Text project. I personally use the excellent Project Manager package for managing my projects, though this isn't necessary. Then you can use the Project Specific Syntax Settings package to tell Sublime Text to use the TOPAS syntax highlighting for your project, by choosing Edit Project from the Command Palette:

{
    ...
    "syntax_override": {
        "\\.txt$": ["Topas Syntax", "Topas"]
    }
}

Other text editors

It might be possible to import the Topas.tmLanguage grammar file into other editors such as TextMate. Please let me know if you install it on another editor, and I can update the README.

This syntax highlighting logic has also been adapted for other text editors:

Note about colors

The actual colors used in the syntax highlighting is determined by your theme, so you may see a different color scheme to the image above. I am using the Monokai theme.