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