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