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

INI

by jwortmann ALL

Syntax highlighting for INI and REG files in Sublime Text

Details

  • 2016.07.09.20.30.02
    1.6.1
  • github.​com
  • github.​com
  • 1 month ago
  • 1 hour ago
  • 12 years ago

Installs

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

Readme

Source
raw.​githubusercontent.​com

INI Syntax

License Version GitHub Actions

A package for Sublime Text that provides syntax highlighting for INI and related file types like Windows Registry (.reg) files.

Installation

The package can be installed via Sublime Text's package manager Package Control. From the command palette choose Package Control: Install Package and search for INI.

Features

You can navigate between sections in opened INI files via Sublime's Goto Symbol… feature from the menu or with the keyboard shortcut Ctrl+R (+R on macOS).

Customization

Syntax highlighting

Following the naming conventions for key-value pairs, the scopes meta.mapping.key.ini string and meta.mapping.value.ini string are applied for keys and string values, respectively. If you prefer different highlighting colors for key names and values, ensure to use a color scheme which targets one of these scopes to distinguish between them. You can easily add such a rule as a customization to your color scheme, as described in the official documentation. For example, if you want keys to be highlighted with the same color as keywords in Mariana, create a file Mariana.sublime-color-scheme in your Packages/User directory with the following content:

{
    "rules": [
        {
            "scope": "meta.mapping.key.ini string",
            "foreground": "var(pink)"
        }
    ]
}

Comment toggling

The default character used by the “toggle comment” functionality (Ctrl+/) in INI files is a semicolon. If you prefer to use # instead, you can achieve that by adding a custom key binding with a "variant": 2 argument for the toggle_comment command (this requires Sublime Text build 4130 or later):

{
    "keys": ["ctrl+/"],
    "command": "toggle_comment",
    "args": {"block": false, "variant": 2},
    "context": [{"key": "selector", "operand": "source.ini"}]
}