Two Modes
Mode 1: File Reference
Point to a file with optional line range:
/note-snippet src/auth.swift:10-25
This reads the file, extracts lines 10-25, detects the language from the file extension, and adds a source citation to the note.
Mode 2: Inline Code
Paste code directly:
/note-snippet const token = jwt.sign(payload, secret, { expiresIn: '1h' })
Language is detected from syntax patterns — imports, brackets, keywords, operators.
Annotations
Add context after the -- separator:
/note-snippet src/auth.ts:5-20 -- JWT validation logic for the middleware refactor
The annotation appears below the code block in the note, providing context for why you saved this snippet.
Language Detection
| Source | Detection Method |
|---|---|
| File reference | File extension (.ts, .py, .swift, etc.) |
| Inline code | Syntax analysis (imports, keywords, operators) |
Smart Titles
AI generates a descriptive title (max 6 words) by analyzing the code:
JWT Token Validationfor auth codeReact Auth Hookfor a custom hookDocker Compose Configfor infrastructure
Limits
- Maximum ~50 lines per snippet
- Longer snippets are truncated with a note indicating the full length
- For larger code sections, consider saving to a file instead