Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Hash AnchorNew to Visual Studio Code? Get it now.
Hash Anchor

Hash Anchor

samenekochan

| (1) | Free
Simple current-file anchor navigator for VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

lightweight current-file anchor navigator


Hash Anchor

TypeScript Version Release License Downloads

Lightweight current-file anchor navigator for VS Code.

Hash Anchor only scans the file currently opened in the active editor.

It does NOT:

  • scan the workspace
  • scan all project files
  • scan VS Code's Open Editors list

The extension only reads:

vscode.window.activeTextEditor.document

Features

  • Current-file-only anchor navigation
  • Sidebar anchor list
  • Quick Pick anchor list
  • Multi-language anchor support
  • Configurable parsing modes
  • Large semi-transparent anchor decorations
  • Lightweight and fast
  • No workspace indexing

Supported Anchor Styles

Hash Anchor supports multiple comment styles.

Examples:

//#anchor render
#anchor init
--#anchor player
<!-- #anchor ui -->
/* #anchor theme */

Empty anchors are also supported:

//#anchor
<!-- #anchor -->

Unnamed anchors will display as:

(line X)

Parsing Rules

Anchors are only matched when the line begins with:

  • optional whitespace
  • comment prefix or anchor token
  • #anchor

Examples:

//#anchor valid
    //#anchor valid
<!-- #anchor valid -->

These will NOT match:

let a = 0; //#anchor invalid
<div> <!-- #anchor invalid -->

Modes

Auto Mode (default)

Tries:

  1. language-based parsing
  2. pattern-based parsing
  3. bare #anchor

Language Mode

Uses configured language-specific anchor formats.

Example:

"javascript": "//#anchor ${1:}"

Pattern Mode

Matches generic comment-like prefixes before #anchor.

Useful for unknown or extension-provided languages.


Commands

Open Current File Anchor List

Command:

hashAnchor.lister.keybind

Opens a Quick Pick list of anchors from the current file.

Refresh Anchors

Command:

hashAnchor.refresh

Refreshes the anchor list and decorations.


Keybindings

No default keybinding is registered.

Example:

{
  "key": "ctrl+alt+a",
  "command": "hashAnchor.lister.keybind"
}

Configuration

Parsing Mode

"hashAnchor.mode": "auto"

Available values:

  • auto
  • language
  • pattern

Pattern Prefix Limit

"hashAnchor.pattern.maxPrefixLength": 4

Limits how many non-whitespace characters are allowed before #anchor in pattern mode.

Range:

1 - 16

Example

//#anchor init

function initialize() {

}
<!-- #anchor ui -->

<div class="container"></div>
#anchor setup

def setup():
    pass

Screenshots

image
Auto-complete support for #anchor markers.

image
Navigate between anchors quickly using the sidebar and quick picker.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft