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