Documentation

Complete guide to using Code Context Notes for smart code annotations

What Problem Does This Solve?

Understanding the core challenge and how Code Context Notes addresses it

The Problem

Code comments clutter source files and pollute git history
External documentation becomes outdated and disconnected from code
Important context gets lost over time

The Solution

Code Context Notes provides contextual annotations that:

Live alongside your code without being part of it
Track code movement and refactoring automatically
Maintain complete version history
Support multiple annotations on the same code location
Integrate natively with VSCode's comment UI

Perfect For:

  • 📝 Technical debt documentation
  • 🎓 Onboarding new developers
  • 💡 Implementation decisions
  • 🤝 Team knowledge sharing

Installation

Get started with Code Context Notes in VS Code

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Code Context Notes"
  4. Click Install

From Open VSX Registry (VS Codium)

Available for VS Codium and other Open VSX compatible editors

codium --install-extension jnahian.code-context-notes

From Command Line

code --install-extension jnahian.code-context-notes

Quick Start

Add your first note in three simple steps

1

Select Code

Highlight the line(s) of code you want to annotate

2

Add Note

Right-click and select "Code Notes: Add Note", or press Ctrl+Alt+N (or Cmd+Alt+N on Mac)

3

Save

Type your note with markdown formatting and click Save

Keyboard Shortcuts

Speed up your workflow with these shortcuts

Main Commands

Add Note

Right-click menu or shortcut

Ctrl+Alt+N
Delete Note
Ctrl+Alt+D
View History
Ctrl+Alt+H
Refresh Notes
Ctrl+Alt+R

Markdown Formatting

Bold
Ctrl+B
Italic
Ctrl+I
Inline Code
Ctrl+Shift+C
Code Block
Ctrl+Shift+K
Link
Ctrl+K

On Mac, use Cmd instead of Ctrl

Key Features

What makes Code Context Notes powerful

Native VS Code Integration

Uses VS Code's native comment UI with CodeLens indicators and inline editing

Intelligent Content Tracking

Notes follow code content even when line numbers change using content hash tracking

Complete Version History

Full audit trail of all note modifications with timestamps and authors

Human-Readable Storage

Notes stored as markdown files in .code-notes/ directory

Usage Guide

Detailed instructions for common tasks

Multiple Notes Per Line
New

Add unlimited annotations to the same code location with smart navigation between notes.

Adding Multiple Notes
  1. Click the "➕ Add Note" CodeLens button on a line with existing notes
  2. Or click the button in the comment thread
  3. Each line can have unlimited notes with unique perspectives
Navigating Between Notes
  • Previous button: Navigate to the previous note
  • Next button: Navigate to the next note
  • Indicator: Shows "Note X of Y" to track position
Button Layout
Single note: [+] [Edit] [History] [Delete]
Multiple notes: [<] [>] [+] [Edit] [History] [Delete]

Editing Notes

  1. Click the Edit button (pencil icon) in the comment thread
  2. Modify the note content with markdown formatting
  3. Click Save to create a new history entry
  4. Or click Cancel to discard changes

Viewing History

  1. Click the History button (clock icon) in the comment thread
  2. History appears as replies showing action, author, and timestamp
  3. View previous content for each edit

Deleting Notes

  1. Click the Delete button (trash icon) in the comment thread
  2. Confirm the deletion
  3. Note is marked as deleted in history (not permanently removed)
  4. CodeLens indicator disappears

Markdown Formatting

Full markdown support with keyboard shortcuts

Bold Text
Ctrl+B
**bold text** or __bold text__
Italic Text
Ctrl+I
*italic text* or _italic text_
Inline Code
Ctrl+Shift+C
`inline code`
Code Block
Ctrl+Shift+K
```javascript function example() {...} ```
Links
Ctrl+K
[link text](https://example.com)
Lists
- Unordered list 1. Ordered list

Configuration

Customize Code Context Notes to your preferences

Storage Directory

"codeContextNotes.storageDirectory": ".code-notes"

Directory where notes are stored (relative to workspace root). Default: .code-notes

Author Name

"codeContextNotes.authorName": "Your Name"

Override automatic username detection. Default: git username or system username

Show CodeLens

"codeContextNotes.showCodeLens": true

Enable/disable CodeLens indicators above code with notes. Default: true

Frequently Asked Questions

Do notes stay with my code when I refactor?

Yes! Notes use content hash tracking to follow code even when line numbers change. If you move code to a different location, the note moves with it.

Can I use notes with any programming language?

Yes! Notes work with all file types and languages supported by VS Code.

Are notes stored in my repository?

Notes are stored in .code-notes/ directory. You can choose to commit them (to share with team) or add to .gitignore (to keep them local).

How do I share notes with my team?

Commit the .code-notes/ directory to your repository. Team members with the extension installed will see all notes.

What's the performance impact?

Minimal. The extension uses caching and efficient algorithms. Even with 100+ notes, you won't notice any lag.

Support & Contributing

Get help or contribute to the project

Requirements: VS Code 1.80.0 or higher, Git (optional, for author detection)

License: MIT - Free and open source