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