vsctags
Use a ctags file to power code navigation in VS Code. No new keybindings — plugs directly into the built-in Go to Definition, symbols, hover, and references systems.
Features
| Feature | Shortcut | How it works |
|---|---|---|
| Go to Definition | F12 / Cmd+Click |
Jumps to the tag's source location |
| Peek Definition | Alt+F12 |
Inline peek at the definition |
| Go to Symbol in Workspace | Cmd+T |
Search all tags by name |
| Go to Symbol in File | Cmd+Shift+O |
List tags in the current file |
| Find References | Shift+F12 |
Show all tag entries for a symbol |
| Hover | Mouse hover | Shows tag kind, file, line, and scope |
Setup
-
Install Universal Ctags
# macOS brew install universal-ctags # Ubuntu/Debian sudo apt install universal-ctags -
Generate a
tagsfile in your project root:ctags -R --fields=+lKSn --extras=+q . -
Open the folder in VS Code. The extension activates automatically and loads the tags.
How it works
- On activation, reads the
tagsfile from the workspace root - Watches the file for changes and reloads automatically
- Pattern-based line numbers (
/^...$/) are resolved lazily on first navigation, not at load time - Source file contents are cached after first read to avoid redundant I/O
Optimized for large codebases
Designed to handle 1,000,000+ symbols efficiently:
- Streaming parser — reads the tags file line-by-line instead of loading it all into memory
- Sorted index + binary search — workspace symbol search (
Cmd+T) uses O(log n) prefix matching - File index — document symbols are O(1) lookup by file path, not a linear scan
- Pre-cached lowercase names — no per-query
toLowerCase()on every entry - Lazy pattern resolution — line numbers from patterns are resolved on-demand with file caching
- Lightweight entries — minimal per-entry memory footprint
Commands
- vsctags: Reload Tags — manually reload the tags file
- vsctags: Show Log — open the output channel with detailed timing and diagnostics
Remote SSH
Works over VS Code Remote SSH. The extension runs on the remote machine where the tags file and source code live.
Requirements
- A
tagsfile in the workspace root (generated by Universal Ctags or compatible) - Universal Ctags recommended (the BSD ctags shipped with macOS does not support
-R)
Release Notes
0.0.1
Initial release — ctags-powered Go to Definition, symbols, hover, references, with streaming parser and lazy resolution.
Description
Languages
TypeScript
98.1%
JavaScript
1.9%