INI
Syntax highlighting for INI and REG files in Sublime Text
Details
Installs
- Total 113K
- Win 56K
- Mac 32K
- Linux 26K
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 8 | 4 | 1 | 14 | 7 | 5 | 7 | 0 | 0 | 6 | 3 | 3 | 3 | 2 | 8 | 16 | 10 | 3 | 3 | 7 | 10 | 8 | 11 | 4 | 5 | 7 | 6 | 5 | 9 | 13 | 7 | 5 | 9 | 8 | 7 | 5 | 11 | 7 | 11 | 3 | 8 | 5 | 6 | 13 | 10 | 12 |
Mac | 0 | 3 | 1 | 4 | 0 | 3 | 0 | 0 | 0 | 0 | 4 | 11 | 7 | 2 | 2 | 4 | 2 | 3 | 2 | 2 | 2 | 3 | 2 | 5 | 3 | 1 | 2 | 3 | 5 | 4 | 5 | 4 | 2 | 1 | 0 | 0 | 3 | 3 | 3 | 5 | 0 | 4 | 1 | 3 | 3 | 4 |
Linux | 1 | 5 | 0 | 3 | 2 | 1 | 0 | 0 | 0 | 3 | 4 | 2 | 0 | 2 | 5 | 4 | 3 | 1 | 3 | 1 | 5 | 4 | 4 | 6 | 5 | 6 | 1 | 3 | 4 | 4 | 5 | 3 | 3 | 3 | 3 | 6 | 5 | 3 | 4 | 1 | 4 | 3 | 7 | 4 | 0 | 3 |
Readme
- Source
- raw.githubusercontent.com
INI Syntax
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"}]
}