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 year ago
  • 1 week ago
  • 13 years ago

Installs

  • Total 114K
  • Win 56K
  • Mac 32K
  • Linux 26K
Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8
Windows 1 10 12 8 10 5 6 4 5 14 9 7 14 6 10 5 7 6 14 3 7 4 8 4 7 11 5 3 6 6 4 6 12 9 4 7 7 7 12 7 7 7 11 6 4 5
Mac 1 1 5 5 2 2 3 1 5 7 2 1 3 5 7 1 4 5 4 4 2 2 8 1 6 8 2 2 2 1 2 7 5 4 1 0 1 5 1 3 1 1 1 1 2 2
Linux 0 3 1 3 2 2 2 1 5 6 2 3 6 5 5 2 4 10 4 1 3 3 5 3 5 2 4 2 4 4 2 4 5 1 4 4 2 0 5 4 4 2 3 1 2 3

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"}]
}