Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Comment LinkingNew to Visual Studio Code?Β Get it now.
Comment Linking

Comment Linking

Viktor Kratiuk

|
45 installs
| (0) | Free
πŸ”— Link between comments in code. Create anchors and jump to them from anywhere
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

💬 Comment Linking extension for VS Code

Logo

VS Marketplace VS Marketplace Downloads VS Marketplace Rating

Open VSX Registry Open VSX Downloads Open VSX Rating

License

🔗 Link between comments in code. Create anchors and jump to them from anywhere


🎬 Examples

🧠 How it works

  • Add an anchor comment where you want to jump to: [[AnchorID|Some anchor]]

  • Reference it elsewhere: [[#AnchorID|Go to anchor]]

  • Click the link while holding Ctrl (Cmd on macOS) to jump to the anchor. The Anchors view shows all anchors across your workspace

  • Basic Link ↔ Anchor interaction:

    Link-Anchor Demo

  • Anchors view (tree of all anchors):

    Note: This demo shows the legacy anchor syntax Anchors View Demo

  • Markdown Preview with anchors and links support:

    Markdown Preview Demo

    ✨ Supports back/forward navigation, live reload on file changes, and opens linked Markdown files within the same preview


✨ Features

  • 🔍 Anchors tree view to browse anchors across files
  • 🎯 Inline links in comments that jump to anchors
  • 🖍️ Smart decorations to highlight only the preview text
  • 📋 Copy anchor ID from the Anchors view
  • 📖 Markdown Preview with anchors and links support
  • 🙈 Ignore files on all levels (.gitignore, .commentlinkingignore, .git/.commentlinkingignore)

βœ… Supported languages and file formats

  • C (.c)
  • C# (.cs)
  • C++ (.cpp, .cxx, .cc, .hpp, .h)
  • Clojure (.clj, .cljs, .cljc)
  • CSS (.css, .scss, .sass, .less)
  • Dart (.dart)
  • Dockerfile (Dockerfile, dockerfile, Dockerfile.*)
  • Go (.go)
  • HTML (.html, .htm) - supports HTML, JavaScript, and CSS comments
  • Java (.java)
  • JavaScript (.js)
  • JavaScript React (.jsx)
  • JSON (.json)
  • JSON With Comments (.jsonc)
  • Kotlin (.kt, .kts)
  • Makefile (Makefile, makefile, .mk)
  • Markdown (.md) - full text support
  • PHP (.php)
  • PowerShell (.ps1, .psm1, .psd1)
  • Python (.py)
  • Ruby (.rb)
  • Rust (.rs)
  • Shell (.sh, .bash, .zsh)
  • Svelte (.svelte)
  • Swift (.swift)
  • TOML (.toml)
  • TypeScript (.ts)
  • TypeScript React (.tsx)
  • Vue (.vue)
  • XML (.xml)
  • YAML (.yaml, .yml)

📂 Indexing scope & exclusions

  • Scans all workspace folders for supported file extensions

🙈 Supported ignore files

File Works Priority Note
.gitignore by default lowest Disable via commentLinking.useGitignore setting
.commentlinkingignore always medium Project-level exclusions
.git/.commentlinkingignore always highest Local exclusions, not tracked by git

📦 Installation

  • Search for Comment Linking in VS Code Marketplace and install
  • Reload VS Code window (you'll be prompted on first install)

To install a manually built version (Snapshot Build):

⚠️ This requires Node.js and pnpm installed on your machine

git clone https://github.com/kratiuk/commentlinking.git
cd commentlinking
pnpm install
pnpm package # This will generate a .vsix file

Then in VS Code: Extensions β†’ ... β†’ Install from VSIX... and select the generated file


📊 Debugging & Logging

To view detailed indexing logs and performance information:

  1. Open VS Code Output panel (View > Output)
  2. Select "Comment Linking" from the dropdown
  3. Watch real-time indexing progress and timing information

βœ… Roadmap / To‑Do

  • [ ] 🔗 Add support for creating anchors and links without preview text in backlinks
  • [ ] 🔀 Add sorting by line numbers in anchor tree view
  • [ ] βš™οΈ Add support for custom comment types for specific files
  • [ ] 🎨 Add functionality to configure anchor and link styles
  • [ ] 🏷️ Add button in anchor tree to toggle between displaying anchor IDs and preview text
  • [ ] 🔍 Add support for displaying all links to a specific anchor in the editor
  • [ ] 📚 Add and host comprehensive documentation
  • [x] 📖 Create Markdown preview with link and anchor support
  • [x] 🧵 Support multiline comments (block and triple-quote styles)
  • [x] 🌐 Add more languages (e.g., Go, Rust) and support .jsx/.tsx
  • [x] 📁 Add support for using .gitignore file as default exclusion file

Made with 😡 by Viktor Kratiuk

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