Package Control

The official Sublime Text package manager.

StyleTokenHighlighter

A Sublime Text plugin that adds Notepad++'s "Style all occurrences of token" and occurrence navigation features.

By leoshome
Created April 28, 2026, last updated June 23, 2026.

JunMayAprMarFebJan Dec2025 NovOctSepAugJul 2026-W28 | installs: 4 | removals: 0 | upgrades: 0 2026-W28 | installs: 4 | removals: 0 | upgrades: 0 2026-W28 | installs: 4 | removals: 0 | upgrades: 0 2026-W27 | installs: 4 | removals: 1 | upgrades: 0 2026-W27 | installs: 4 | removals: 1 | upgrades: 0 2026-W27 | installs: 4 | removals: 1 | upgrades: 0 2026-W26 | installs: 3 | removals: 1 | upgrades: 0 2026-W26 | installs: 3 | removals: 1 | upgrades: 0 2026-W26 | installs: 3 | removals: 1 | upgrades: 0 024 WeeklyInstalls 024 WeeklyUpgrades 2026-W26 | upgrades: 0 1.3.0 2026-W25 1.2.0 / 1.1.0 2026-W18 1.0.0
Installations: recent average 4 per week, 11 in total
Installations minus removals
Upgrades

Links

Versions

1.3.0 ·
2026-06-23 18:22

More

Style Token Highlighter

A Sublime Text plugin that adds Notepad++'s "Style all occurrences of token" feature. Highlight tokens with 9 color styles and navigate between occurrences.

Features

Screenshots

Highlighting Tokens

Select a word, right-click, and choose a style. All occurrences will be highlighted.

Highlighting Demo

Installation

Via Package Control (Coming Soon)

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
  2. Select Package Control: Install Package.
  3. Search for StyleTokenHighlighter and press Enter.

Usage

All commands are available via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and the right-click context menu:

  1. Highlight: Select a word → Right-click → Style Token Highlighter → Choose a style (1-9)
  2. Toggle: Select a word → Command Palette → StyleToken: Toggle Highlight (Auto Style) (auto-picks next available style)
  3. Go: Place cursor on a highlighted token → Right-click → Go to Next/Previous Same Style
  4. Clear: Right-click → Clear Specific Style or Clear All Style

Settings

You can customize the highlight colors via Preferences > Package Settings > StyleTokenHighlighter > Settings.

The colors array accepts any valid Sublime Text scope name. Default:

{
    "colors": [
        "string",
        "comment",
        "keyword",
        "constant",
        "support.function",
        "variable",
        "entity.name.class",
        "invalid",
        "storage.type"
    ]
}

Changing Colors

Replace any scope name with a different one. The actual color depends on your color scheme (e.g., Monokai, Mariana). Common scopes:

Scope Typical Color
string Green
comment Gray
keyword Purple/Blue
constant Orange
constant.numeric Orange
variable Red
entity.name.function Blue
entity.name.class Yellow
entity.name.tag Red
support.function Blue
storage.type Purple
invalid Red background
markup.heading Bold
punctuation White/Gray
constant.character.escape Cyan

Adding More Colors

Add more items to the array — there's no limit. Style 10, 11, 12... will become available automatically:

{
    "colors": [
        "string",
        "comment",
        "keyword",
        "constant",
        "support.function",
        "variable",
        "entity.name.class",
        "invalid",
        "storage.type",
        "entity.name.function",
        "entity.name.tag",
        "constant.numeric"
    ]
}

Finding Available Scopes

To see what scopes are available in your color scheme:

  1. Place the cursor on any word in your code
  2. Press Ctrl+Alt+Shift+P (Windows/Linux) or Cmd+Alt+Shift+P (macOS)
  3. The status bar shows the scope at that position (e.g., source.python keyword.control)

Use these scope names in your colors array.

Key Bindings

This package doesn't ship key bindings to avoid conflicts with your existing shortcuts. To set up your own, open Preferences > Key Bindings and copy the examples below. Customize the key combinations to your liking.

// Toggle highlight (auto-picks next available style)
{ "keys": ["primary+k", "primary+h"], "command": "style_token_toggle_highlight" },

// Highlight with specific style (color_index 0-8)
{ "keys": ["primary+k", "primary+1"], "command": "style_token_highlight", "args": {"color_index": 0} },
{ "keys": ["primary+k", "primary+2"], "command": "style_token_highlight", "args": {"color_index": 1} },
{ "keys": ["primary+k", "primary+3"], "command": "style_token_highlight", "args": {"color_index": 2} },
{ "keys": ["primary+k", "primary+4"], "command": "style_token_highlight", "args": {"color_index": 3} },
{ "keys": ["primary+k", "primary+5"], "command": "style_token_highlight", "args": {"color_index": 4} },
{ "keys": ["primary+k", "primary+6"], "command": "style_token_highlight", "args": {"color_index": 5} },
{ "keys": ["primary+k", "primary+7"], "command": "style_token_highlight", "args": {"color_index": 6} },
{ "keys": ["primary+k", "primary+8"], "command": "style_token_highlight", "args": {"color_index": 7} },
{ "keys": ["primary+k", "primary+9"], "command": "style_token_highlight", "args": {"color_index": 8} },

// Navigate between highlights
{ "keys": ["primary+k", "primary+n"], "command": "style_token_go_next" },
{ "keys": ["primary+k", "primary+p"], "command": "style_token_go_prev" },

// Clear all highlights
{ "keys": ["primary+k", "primary+0"], "command": "style_token_clear_all_highlight" }

Note: primary maps to Ctrl on Windows/Linux and Cmd on macOS.

For more information on key bindings, see the Sublime Text documentation.

Context Menu

This package ships a context menu by default. To customize or disable it:

  1. Open the Packages directory (via Preferences > Browse Packages...).
  2. Create a StyleTokenHighlighter directory inside it (if it doesn't exist).
  3. Create a Context.sublime-menu file in that directory.

To disable the context menu completely, put this in the file:

[]

To customize it, copy the original menu and remove or modify the entries you don't need.

Your copy overrides the one shipped with the package. See the official documentation for more details.


Attribution

This plugin was written with AI assistance and reviewed by the author.

License

This project is licensed under the MIT License - see the LICENSE file for details.

License: MIT

Results

Packages